Tabs meet WCAG 2.2 level AA when used as described on these pages. They follow the Tabs pattern of the WAI-ARIA Authoring Practices.
Keyboard
| Key |
Action |
| Tab |
Moves focus to the selected tab, then to the panel. |
| ← → |
Move to the previous or next tab and select it. Vertical tabs use ↑ ↓. |
| Home End |
Move to the first or last tab. |
| Enter Space |
Select the focused tab, with activationMode="manual". |
What Tabs gives you
role="tablist", role="tab" with aria-selected and aria-controls, and role="tabpanel" named by its tab.
- One Tab stop for the whole list; the arrow keys move inside it.
- The panel takes focus, so keyboard users reach content that has no focusable element. It shows the focus ring.
- The selected tab differs in fill, text colour and a 2 px bar, not in colour alone.
- On touch screens each tab is 44 px high.
What your team does
- Give the list an
aria-label when the page has more than one tab list.
- Keep tab labels short and unique on the page.
- Keep a panel’s content in the panel; don’t make a tab open another page.
- Don’t put a form’s required fields in a tab people may not open.
WCAG criteria
| Criterion |
Level |
How |
| 1.3.1 Info and Relationships |
A |
tablist, tab and tabpanel roles, panels named by their tab |
| 1.4.1 Use of Color |
A |
Selected adds a fill and a bar |
| 1.4.11 Non-text Contrast |
AA |
The bar color.border.selected is held at 3:1 on the selected fill (D24) |
| 2.1.1 Keyboard |
A |
Arrow keys, Home, End |
| 2.4.7 Focus Visible |
AA |
Focus ring on tabs and the panel |
| 4.1.2 Name, Role, Value |
A |
aria-selected on the selected tab |