AccessibilityKeyboard
Keyboard
Every interaction works with the keyboard. The mapping is short, the rules are short, and the audit is on every release.
The key bindings
The system follows the WAI-ARIA Authoring Practices. Below are the bindings that are non-obvious or that this site uses in a specific way.
| Key | Action |
|---|---|
Tab | Move focus forward through interactive elements |
Shift + Tab | Move focus backward |
Enter | Activate a link or button |
Space | Activate a button; toggle a checkbox or switch |
Escape | Close the active dialog, sheet, or popover |
Arrow keys | Move within a radio group, a select, or a menu |
Home | Move to the first item in a list or menu |
End | Move to the last item in a list or menu |
Cmd + K | Open the doc system search |
/ | Open the production site search (when on the main site) |
Tab order
The tab order of a page follows the visual order. There are notabindex values greater than 0 in the codebase. Focus moves predictably from top-left to bottom-right, in the order the reader's eye would move.
- Skip link is the first focusable element on every page
- Site header comes second
- Page main is third
- Page footer is last
The skip link
A hidden "Skip to main content" link is the first focusable element on every page. It is visually hidden until it receives focus; then it becomes a 2.5 rem tall link in the top-left corner of the viewport. Activating it moves focus to main#main-content.
Rules of thumb
- Buttons activate on Enter and Space. Links activate on Enter only.
- Dialogs trap focus. Escape closes. Tab cycles within the dialog.
- Sheets trap focus while open. Escape closes.
- Form fields: Enter submits if there is a primary action; Tab moves to the next field.
- Menus use the ARIA Authoring Practices menu pattern. Arrow keys move, Escape closes, Enter activates.
- Skip links are required on every page. They are not optional.
The audit
Before each release, every interactive element is verified to be:
- Reachable by Tab
- Operable by Enter and (where applicable) Space
- Reversible by Escape or by the inverse action
- Announced with a clear, concise name