Open joe-watkins opened 7 years ago
I like the idea, I just wonder if it’s a good one (in the sense that I wonder if focus change would be expected). Ping @heydon & @ffoodd.
@HugoGiraudel Tnx :) Maybe an optional feature might be the way to go?
Here's an example pattern from W3C WAI-ARIA
Hi there,
My two cents: I think it's a good idea as an option.
The most common way to use a toggle is that hidden content follows the trigger (DOM speaking). This way, appearing content becomes next content in the flow — and if any focusable element inside, it naturally appears in the focus flow too.
But if for any reason the toggled content is anywhere else in the DOM, I think it's better to move focus to the toggled content (same arguments than with the dialog pattern) as recommended by @joe-watkins.
Hi. Sorry, I am not a bigger help right now. But this would be the number one feature addition I would love to see! :)
Hello :) Great work here!
I'd like to recommend the idea of focus management for your plugin. It would look something like this:
tabindex="-1"
to target so it can receive focus.What ya think?