Accessibility that ships with the tokens

Accessibility work fails in a predictable way. It starts as a heartfelt audit, produces a long list of issues, gets scheduled for "after the release," and then loses to every deadline that follows. Six months later the list is still there, a little longer.
The fix that actually holds is structural. If contrast, focus, motion and target size are decided once in the foundation of the design system, every new screen inherits the right behaviour without anyone having to remember. Accessibility stops being a chore people must choose, and becomes the default that people must actively work to break.
Why Friday chores lose
A task that depends on individual discipline will lose to a task that depends on a deadline. That is not a character flaw; it is how attention works under pressure. If checking contrast means opening a separate tool at the end of a design, some designs will skip it. If adding a visible focus style means writing extra CSS for every component, some components will ship without it.
The goal, then, is to reduce the number of accessibility decisions that individuals have to make. Every decision moved into the system is one fewer chance to forget it.
Start with colour decisions, not colour palettes
A palette is a list of colours. A colour system is a list of pairs that are known to work together. The difference matters, because contrast is a property of a pair, not of a colour.
Here is the approach we prefer.
- Define text and surface roles first: primary text, secondary text, disabled text, and the surfaces they sit on.
- For each role pair, check the contrast ratio against WCAG AA at the real sizes used, not just in the abstract. Body text needs at least 4.5 to 1. Large text and essential UI boundaries need at least 3 to 1.
- Record the passing pairs as tokens with semantic names, so a designer picks "text on surface" rather than choosing two hex values.
- Test the pairs in both light and dark themes. A pair that passes in one often fails in the other.
Common contrast failure modes
- Light grey placeholder text that looks elegant and is unreadable on a phone outdoors.
- Brand colour used for links on a tinted background, where the ratio quietly drops below the threshold.
- Text over images with no scrim, which passes on one photo and fails on the next.
- Disabled states that are so faint they also hide the label, so users cannot tell what is disabled.
- Error messages that rely on red alone, with no icon or text change.
The last one is worth a sentence. Colour alone should never carry meaning. An error needs words, and ideally an icon, in addition to colour.
Focus is part of the component
Keyboard focus is where design systems most often cheat. A default browser outline gets removed because it clashes with the visual style, and nothing replaces it. A keyboard user is then navigating a page they cannot see.
Our rule is simple: a component is not finished until its focus state is designed. That means:
- A visible focus ring with enough contrast against both the component and its background.
- A focus style that works on light and dark surfaces, usually through an offset ring rather than a coloured border.
- Use of the focus-visible behaviour so that mouse users are not distracted, while keyboard users still get a clear indicator.
- A logical tab order that follows the visual order, tested by actually tabbing through the page.
We also check the less obvious cases: modals that must trap focus and return it on close, menus that must be reachable without a mouse, and custom controls like sliders and tabs that need the right keyboard behaviour built in.
A five-minute keyboard test
Put your mouse away. Tab through a page from top to bottom. Can you always see where you are? Can you reach every control? Can you open and close every overlay? Can you complete the main task? Five minutes, no tools, and it finds more problems than most automated scans.
Motion has a polite mode
Motion can delight, and it can also make people feel physically unwell. Vestibular disorders are common enough that respecting the reduced motion preference is a basic courtesy, not an optional extra.
We build it into the motion tokens. Each animation has a normal version and a reduced version, defined together, so nobody has to remember to add the second one later.
- Large movements such as parallax, zooms and sliding panels become simple fades or no animation at all.
- Looping and auto-playing animations stop, or become something the user can pause.
- Essential feedback, such as a button press, remains, but gets shorter and calmer.
- Transitions never rely on motion alone to communicate state.
The prefers-reduced-motion media query is the hook. We centralise it, so a single decision applies across the whole interface.
Target size and spacing
A control that looks neat can be very hard to hit. Small targets hurt people with motor difficulties, but they also hurt anyone using a phone with one hand on a train.
A practical baseline is a minimum interactive target of 44 by 44 CSS pixels for touch, with enough spacing between neighbours that a slightly missed tap does not trigger the wrong action. Icons can be visually smaller than their hit area; the hit area is the thing that matters.
We build this into component tokens. A button or icon control gets its minimum size from the system, and designers have to deliberately override it rather than accidentally forget it.
Semantics before styling
Many accessibility problems are not visual. They sit in the structure of the page.
- Use real buttons for actions and real links for navigation. A styled div with a click handler is invisible to many assistive technologies.
- Use headings in a meaningful order so people using a screen reader can scan the page.
- Label every form field with a visible label, and connect it properly. Placeholders are not labels.
- Give images meaningful alternative text when they carry information, and empty alt text when they are decorative.
- Make error messages specific, and associate them with the field that caused them.
When a design system ships components with these semantics baked in, teams build accessible interfaces by default, simply by using the components as intended.
Make the system enforce itself
Documentation helps, but enforcement is stronger. A few practical guardrails:
- Automated checks in the component library: contrast tests on token pairs, and basic accessibility linting in the build.
- Visual tests for focus states, so a regression is visible in review.
- A short accessibility note in every component spec: keyboard behaviour, screen reader behaviour, and known limitations.
- A habit of testing with real assistive technology occasionally, not just scanners. Automated tools catch a fraction of real issues, so a human pass still matters.
Be honest about limits. A system can make accessibility much easier to get right, but it cannot guarantee it. Content, custom interactions and unusual layouts all need human attention. We would rather say that plainly than claim a component library makes a product accessible by itself.
Before and after thinking
A common starting point looks like this: a team designs screens, builds them, and then runs an accessibility audit near the end. The audit finds dozens of issues across many screens, each needing a separate fix, and the fixes compete with new features.
The better shape looks like this: the foundation decisions, contrast pairs, focus styles, motion rules, target sizes and semantics, are made once. New screens inherit them. The audit near the end finds a small number of issues specific to new, custom patterns, and those are quick to deal with.
The total effort is not smaller on day one. It is much smaller by month six.
A system is a set of decisions made once and reused thousands of times. Make the right call at the foundation.


