Accessibility
Accessibility is built into the tokens and the components, not bolted on.
Colour & contrast
- Text pairs meet WCAG 2.x 4.5:1 (body text targets 7:1). Component boundaries and focus rings meet 3:1. This is enforced by unit tests across 12 seed colours × light/dark × normal/more contrast.
- Text on solid fills automatically switches between white and a dark tint. If neither passes, the fill itself is adjusted.
contrast: 'more'(or a high-contrast theme) raises every target. Forced-colours mode maps tokens to system colours.- State is never shown by colour alone: errors have an icon and text, and selected tabs have an underline drawn with a border, so it survives forced colours.
Native first
- Dialogs use native
<dialog>+showModal(): inert page, focus containment, Esc and focus return come from the browser. - Menus, popovers and toasts use the Popover API. Tooltips use
popover="hint", are hoverable and Esc-dismissible (WCAG 1.4.13). - Accordions are
<details>and tab panels usehidden="until-found", so find-in-page still works. - Form controls are form-associated custom elements (
ElementInternals): they submit, reset and validate like native inputs. Labels, hints and errors are wired witharia-describedby.
Motion & transparency
- Spatial motion only runs under
prefers-reduced-motion: no-preference. Loading indicators slow down instead of stopping, so busy state is still communicated. - Glass surfaces become opaque under
prefers-reduced-transparencyand get stronger underprefers-contrast: more. - Toasts never steal focus, pause while hovered or focused, and announce via
ariaNotify()with a live-region fallback.
Keyboard
| Component | Keys |
|---|---|
| Tabs | ←/→ move and select, Home/End |
| Menu | ↑/↓, Home/End, type-ahead, Esc closes and returns focus |
| Radio group | Native arrow-key navigation |
| Dialog / drawer | Esc closes (configurable with dismiss) |