-
Notifications
You must be signed in to change notification settings - Fork 339
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
Enhance Tabs Design Pattern to Provide Guidance on Panel Focusability #323
Comments
We're trying to wrap our heads around why the tabpanel should be focusable when there are no focusable elements within it. Can anyone shed light on why that would be? Not sure of the accessibility benefits of focusing a non-interactive tab panel. Thanks! |
Hi, If the tabpanel is not focusable, then sighted keyboard-only users will not be able to tab to the tabpanel content and read it from the beginning on down, but will instead jump to Agree and entirely skip all of the main content. This is also helpful for screen reader users who may wish to move directly from the focused expanded Tab and be placed at the beginning of the newly rendered Tabpanel content, instead of jumping passed it or moved to the end of it unexpectedly. |
That makes perfect sense. Thank you @accdc! |
Adding to carousel project because carousels are another pattern where having focusable tabpanels can be useful. In particular, some carousels enable left/right arrow keys to work as hotkeys for the prev/next buttons, and in these cases, the panel would need to be focused when the arrow keys are pressed. |
Can the tabpanel focusability guidance be simplified to let the author decide whether to place focus on the tabpanel? Then tabpanel focusable can be an optional yes or no. (The author can then decide whether focus on the tabpanel is needed depending on the general length and type of content displayed. Guidance can be provided on when focus should be enabled for the tabpanel.) Content inside the tabpanel is not always controlled by the implementor of the tab component. The same set of tabs might have different tabpanel content where sometimes the content contains focusable elements and sometimes it does not. The behavior of focus on the tabpanel would then appear to be different depending on the specific content within the tabpanel if the guidance is followed for "focus to the next element in the page tab sequence outside the tablist, which is the tabpanel unless the first element containing meaningful content inside the tabpanel is focusable." Making focus on the tabpanel an option to be determined by the author would give the author control instead of having focus on the tabpanel being determined by any content that might be displayed within the tabpanel. |
Add a note to the keyboard subsection of the
Tabs Design Pattern
that provides guidance regarding when it is advisable to make the tabpanel focusable, e.g.:
The text was updated successfully, but these errors were encountered: