juanca / react-aria-components

React ARIA-compliant Components
https://juanca.github.io/react-aria-components
MIT License
6 stars 3 forks source link

Tab Panel should be programmatically focusable #7

Closed juanca closed 6 years ago

juanca commented 6 years ago

From https://github.com/w3c/aria-practices/issues/323#issuecomment-400011586

This was added to account for cases where a tab panel may not include any focusable interactive elements, or if a large amount of textual content appears at the beginning of the tabpanel and the first focusable active element is at the end, such as a license agreement form where the Agree button is at the very end. 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.

juanca commented 6 years ago

We will want to expose this on the properties interface so a consumer can decide whether their usage will require a focusable tab panel (or not).

This might be a pattern for all composite components (tab panel, grid, tree grid, etc). 🤔