Accessibility
Contrast, focus, forced colours, reduced motion and keyboard support in the components.
Contrast
Measured on this site's theme, against the background. Text needs 4.5:1.
- text
17:1 light · 16.3:1 dark.
text-foregroundvar(--foreground)
- row text
12.1:1 light · 9.4:1 dark, on a menu.
text-foreground/85color-mix(in oklab, var(--foreground) 85%, transparent)
- muted text and placeholders
4.8:1 light · 6.4:1 dark.
text-muted-foreground,placeholder:text-muted-foregroundvar(--muted-foreground)
- destructive
4.6:1 light · 6.9:1 dark.
text-destructivevar(--destructive)
- status
5.4–6.3:1 light · 6.9–8.1:1 dark, across success, warning, error and info.
Light oklch(0.5 0.17 255)
Dark oklch(0.704 0.15 255)
Focus
Shown on keyboard focus only, with focus-visible. Focus indicators need 3:1.
- buttons and rows
3.8:1 light · 3.8:1 dark; 3.7:1 on a card's tray.
outline-2 outline-offset-2 outline-transparent focus-visible:outline-foreground/50color-mix(in oklab, var(--foreground) 50%, transparent)
- fields
3.6:1 light · 3.6:1 dark, with a 3px halo. The
focusshadow on the Elevation page.color-mix(in oklab, var(--foreground) 48%, transparent)
- links
3.3:1 light · 3.2:1 dark on body text: the link's own colour at 45%.
focus-visible:outline-current/45color-mix(in oklab, var(--foreground) 45%, transparent)
Forced colours
Shadows are removed in forced-colours mode, such as Windows High Contrast. Fields, menus, selects, dialogs, tooltips and card surfaces carry outline-hidden: no outline normally, and an outline in the system colour in forced-colours mode. Buttons and toasts keep their transparent 2px outline, which forced-colours mode paints. Menu and select rows outline the highlighted row: forced-colors:data-highlighted:outline-solid.
Reduced motion
Transitions carry motion-reduce:transition-none.
Keyboard and roles
Primitives are built on Base UI in React, Bits UI in Svelte and Kobalte in Solid, which supply keyboard handling, focus management and ARIA roles.