You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type the Tab key again - focus should move into the tabpanel (i.e. the div containing "Content for second tab...") but instead, it goes to the browser's location bar.
... move 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.
The Carbon Tabs component doesn't need to know what focusable element inside the tabpanel contains meaningful content. :)
It only needs to know whether or not any of the tabpanel content is focusable. If none are, then the tabpanel itself needs to be focusable (i.e. have tabindex="0").
Wow, that's a really good catch. The use case you describe in w3c/aria-practices#323 (comment) is totally reasonable. Thank you so much for bringing this to our attention!
Steps:
The APG Guidance for Tabs component says that if focus is in the
tablist
and the user types the Tab key:The Carbon Tabs component doesn't need to know what focusable element inside the tabpanel contains meaningful content. :)
It only needs to know whether or not any of the
tabpanel
content is focusable. If none are, then thetabpanel
itself needs to be focusable (i.e. havetabindex="0"
).Here's how one Tabs component decided on a prop for this: point 2 in juanca/react-aria-components#6
based on this comment in issue w3c/aria-practices#323 (comment).
Happy to talk this through before anything is coded.
The text was updated successfully, but these errors were encountered: