tabs
A pattern of tab buttons (role tab) in a tab list, each showing one tab panel of content while hiding the others.
In more detail
Left and Right arrow keys move between tabs using roving tabindex, and Tab moves from the tab list into the active panel. The active tab has aria-selected="true" and aria-controls pointing at its panel.
Related terms
- aria-selected — An ARIA state marking which item is selected in widgets such as tabs, listboxes and grids.
- roving tabindex — A technique where only the active item in a group has tabindex="0" and the rest have tabindex="-1", so the group is one tab stop and arrow keys move between items.
- compound component — A set of components designed to be used together, such as Tabs, Tabs.Trigger and Tabs.Panel, that share state behind the scenes.
- disclosure — A button that shows or hides a section of content, with aria-expanded on the button and aria-controls pointing at the section.
Taught in
- Compound Component Patterns: Context Sharing & Internal State — Design Systems & Component Engineering
- Navigation & Disclosure: Dropdown Menus, Tabs & Accordions — Design Systems & Component Engineering
- Keyboard Navigation Protocols: Roving Tabindex & Virtual Focus — Design Systems & Component Engineering