- Docs
- Components
- Navigation
Tabs
Views of the same thing, one at a time. One Tab stop; the arrow keys move between them.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<div role="tablist">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Keyboard
| Keys | What happens |
|---|---|
| TabTab | To the selected tab, then on to its panel. |
| ←→ | The previous or next tab, selected as it's reached. Up and Down when vertical. |
| HomeHomeEndEnd | The first or last tab. |
| EnterSpace | Selects the focused tab, when activateOnFocus is off. |
02
Behaviour
- Roles
- tablist, tab with aria-selected, and tabpanel, each panel labelled by its tab.
- Name
- The list is named by its aria-label.
- Right to left
- The arrow keys follow the reading way.
- Forced colours
- The bar is drawn in Highlight, the line in CanvasText.
03
Tested
On every change, before it ships.
- axe, WCAG 2.2 A and AA, in Chromium on every pull request
- Firefox and WebKit every night
- Keyboard: every key in the table, in a test
- Forced colours, reduced motion and right to left