-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tabindex="-1" to content element #10
Comments
I'll ping @ffoodd for his opinion on the matter. :) |
I'm not sure whether automatically focusing the expanded content is a good idea or not. I'm hoping to get some feedback from screen reader users. |
Let’s ping @Heydon, he probably has an interesting opinion. :) |
I've moved focus automatically before, but I suspect it's quite jarring to screen reader users. So long as the expanded (true) state is announced, they know they have an expanded node they can move to - probably with the down arrow key or similar. |
What about |
Looking at @nico3333fr's jQuery plugin (which has been tested a lot) it doesn't use However accordingly to what @Heydon said, I think you may document the fact that collapsible region should be the next focusable area after the toggle button. You'll have an exception when this is not the case (same condition than using |
Agree — moving focus probably the correct course if the element is not immediately after the toggle button. The main reason for this is low support for |
Another option is using aria-owns which sets the referenced id as the next node in the a11y tree |
Discussed here: #3. |
Jeremy Keith has written about an accessible content toggle on his blog - https://adactio.com/journal/10365; it’s almost the same approach as a11y-toggle, except that he also adds
tabindex="-1"
to the content element, and then when the content is displayed, it is also focused programmatically. That sounds like a good idea.The text was updated successfully, but these errors were encountered: