This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
TabBar/Tab should only have one tab stop for accessibility #690
Closed

Description
This is related to this issue: material-components/material-components-web#4429
On first render every tab in the tab-bar is a tab stop, since this is the default behavior for buttons without a tabIndex. When selecting another tab, the previously selected tab has its tabIndex state set to -1 meaning it is no longer possible to tab to.
A more accessible solution would be to ensure every tab except the active tab has tabIndex set to -1. This way there is only one tab stop for the tab-bar (assuming no one sets two or more tabs as active, but that is probably acceptable). Navigation between tabs would then occur with arrow keys as is already possible.
Metadata
Metadata
Assignees
Labels
No labels