ARIA tab Role
The tab role marks one tab in a tabbed interface. Tabs sit inside a tablist, and each one controls a tabpanel that is shown when the tab is selected.
Description
The tab role marks one of the tabs in a tabbed interface. A set of tabs is grouped in an element with the tablist role, and each tab controls an element with the tabpanel role that holds its content. Only the panel of the selected tab is shown.
The selected tab has aria-selected="true" and the others aria-selected="false". Each tab points to its panel with aria-controls, and each panel is labelled by its tab with aria-labelledby. Screen readers announce the role and position, for example "Details, tab, selected, 2 of 3".
There is no native HTML tab element, so the keyboard behavior has to be added with JavaScript. Only the selected tab is in the Tab order (tabindex="0", the others tabindex="-1"); the Left and Right arrow keys move between tabs, and Home and End go to the first and last tab. Tabs must be direct children of the tablist, or owned by it with aria-owns.
Properties
- Category
- Widget
- HTML equivalent
- None
- Accessible name from
- contents, author
- Required parent role
tablist- Required child roles
- None
ARIA Attributes
- Required
- None
- Supported
aria-disabled,aria-expanded,aria-haspopup,aria-posinset,aria-selected,aria-setsize- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<div role="tablist"> <button role="tab" aria-selected="true" aria-controls="panel-id">...</button> </div>
Example
Browser Support
The following information will show you the current browser support for the tab ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





