Build keyboard-navigable tabs and toolbars
8 steps · about 1 h 50 min · Intermediate
- Learn the tabs pattern roles and keys (reference, W3C WAI ARIA APG, 15 min)
Lists roles, states and the expected keyboard behaviour.
- Build tabs that activate on focus (tutorial, W3C WAI ARIA APG, 20 min)
Working code for automatic activation with arrow keys.
- Build tabs that activate on Enter or Space (tutorial, W3C WAI ARIA APG, 15 min)
The variant to use when panels are slow to load.
- Move focus with a roving tabindex (article, web.dev, 15 min)
Explains tabindex values and the roving technique in code.
- Wire tab, tablist and tabpanel together (reference, MDN, 10 min)
Shows aria-selected and aria-controls with a full example.
- Group buttons into one tab stop with a toolbar (reference, W3C WAI ARIA APG, 10 min)
Applies the same roving focus to formatting toolbars.
- Build a single or multi-select listbox (reference, W3C WAI ARIA APG, 15 min)
Adds selection and type-ahead to arrow-key navigation.
- Know when a menubar is the wrong pattern (reference, W3C WAI ARIA APG, 10 min)
Clarifies app menus versus site navigation links.