04

Themes, motion & accessibility

Light & dark themes

Every screen is built from about 40 semantic tokens (--surface, --text-2, --agent…). A theme is just a different set of values for the same names, switched by one attribute on the root: data-theme="dark".

  1. Follows the OS first. On a first visit Relay reads prefers-color-scheme.
  2. Remembers the choice. The switch saves it, and every open screen updates together.
  3. Crossfades, never flashes. Colors transition over 200ms, so a switch reads as a change of light, not a reload.
  4. Dark is not inverted. Accents get lighter and less saturated, solid buttons take dark text, and shadows get deeper.
Light
Northwind Labs Platform · €48,000 Follow-up ready to send ApproveNew deal
Dark
Northwind Labs Platform · €48,000 Follow-up ready to send ApproveNew deal

Motion

Motion confirms what just happened and where to look. It is quick, animates only opacity and transform so it stays smooth, and never blocks input.

Motion tokens
TokenValueUse for
--dur-1120msHover, press, small feedback
--dur-2200msState changes, theme crossfade, toggles
--dur-3320msPage and panel entrances, chart values
--ease-outcubic-bezier(.2, .8, .2, 1)Things arriving: fast start, soft landing
--ease-stdcubic-bezier(.4, 0, .2, 1)Color and opacity changes
Enter · 320ms
Page sections rise 8px and fade in, staggered by 40ms. Total under half a second.
State change · 200ms
New states pop in from 97% scale. A confirmation check draws itself. Try it.
Hover & press · 120ms
Hover meLifts 2px
Cards lift on hover. Buttons dip to 97% on press, so every click feels physical.
Live signal · 2s loop
Agent is live
The only looping animation in the system. One per screen, and it stops under reduced motion.
Theme crossfade · 200ms
Background, text and border colors fade together. Layout never moves.
Data change · 320ms
Charts tween to new values instead of redrawing. Press Replay to see it.

Accessibility

Target: WCAG 2.2 AA in both themes. These are rules the components follow, not a checklist added at the end.

Contrast in both themes

All text pairs reach at least 4.5:1 and control borders 3:1, measured per theme. Ratios are listed next to every token in Foundations.

Color is never the only signal

Confidence uses bars plus a word, deal health uses a dot plus a label, changes use strike-through and highlight.

Visible focus, logical order

Every control is a real button, link or input. A clear focus ring appears on keyboard focus, and a Skip to content link comes first on each screen.

Changes are announced

Approve, reject, undo and theme changes are announced through a polite live region, so screen reader users hear the result.

Semantic structure

Landmarks (nav, main, aside), one h1 per screen, captioned tables, description lists for record details, aria-current on the active page.

Agent actions are labelled in words

Agent content is named "Agent" in text, not only colored violet. Buttons repeat the action and record, for example "Approve: Send revised proposal email, Northwind Labs".

Comfortable targets

Action buttons are 32px on desktop and 40px on touch layouts, one size per breakpoint. Inline chips never go under 24px, the WCAG 2.2 minimum.

Reduced motion respected

With the OS setting on, all animation and transitions become near-instant and the live pulse stops. Nothing depends on motion to make sense.

Focus ring · press Tab A link 2px --focus outline, 2px offset. Ink ring: 18.3:1 on light, 15.7:1 on dark surfaces.
Known gaps in this prototype. Keyboard shortcuts (A, R, J, K) work when the inbox list has focus; there is no global shortcut layer yet. Dialogs trap focus and close with Escape. Ask Relay replies are scripted for the demo, not a live model. A full audit with a screen reader is still to do.