Read This First
No ARIA is better than Bad ARIA. Before using any ARIA, read this to understand why.
How to build accessibility semantics into web patterns and widgets
No ARIA is better than Bad ARIA. Before using any ARIA, read this to understand why.
Tabs are a set of layered sections of content, known as tab panels, that display one panel of content at a time. Each tab panel has an associated tab element, that when activated, displays the panel. The list of tab elements is arranged along one edge of the currently displayed panel, most commonly the top edge.
Terms used to describe this design pattern include:
When a tabbed interface is initialized, one tab panel is displayed and its associated tab is styled to indicate that it is active. When the user activates one of the other tab elements, the previously displayed tab panel is hidden, the tab panel associated with the activated tab becomes visible, and the tab is considered "active".
For the tab list:
tab
element.vertical
:
tabindex="0"
to include it in the tab sequence of the page.tablist
.tab
has role tabpanel.tablist
has aria-labelledby set to a value that refers to the labelling element.
Otherwise, the tablist
element has a label provided by aria-label.
tab
has the property aria-controls referring to its associated tabpanel
element.tab
element has the state aria-selected set to true
and all other tab
elements have it set to false
.tabpanel
has the property aria-labelledby referring to its associated tab
element.tab
element has a popup menu, it has the property aria-haspopup set to either menu
or true
.tablist
element is vertically oriented, it has the property aria-orientation set to vertical
.
The default value of aria-orientation
for a tablist
element is horizontal
.This is an unpublished draft preview that might include content that is not yet approved. The published website is at w3.org/WAI/.