Tabs
Keyboard Expectations
- Space or Enter = Activate Tab
- ←→ = Cycles tab focus
- ↑↓ = Cycles tab focus (vertical tabs)
- Home = Focus first tab
- End = Focus last tab
Focus Expectations
- Tabs should activate automatically when receiving focus as long as associated tab panels are rendered quickly.
- Tabs should have visible
:focusstate. - Tabs should have visible
aria-selected="true"state
Labelling Expectations
- The element that wraps tabs has role tablist.
- Each tab has role tab and is contained within the element with role
tablist. - Each tab content panel has role tabpanel.
- Each
tabhas the property aria-controls referring to itstabpanel. - The active
tabhas aria-selected set totrueand all othertabelements have it set tofalse. - Each
tabpanelhas the property aria-labelledby referring to its associatedtab.