Accessibility in design systems: baking contrast, focus states and semantics into components
One of the biggest advantages of a design system is that accessibility work done once can benefit every product that uses it. That also means accessibility gaps get copied everywhere.
Foundations
- Color tokens with contrast in mind: define text and background pairings that meet WCAG contrast ratios (for example 4.5:1 for normal text at level AA) and document which pairings are approved.
- Typography: sensible minimum sizes, support for user text scaling and readable line heights.
- Motion: guidance and tokens that respect reduced-motion preferences.
Components
- Focus states: every interactive component needs a clearly visible focus indicator. Removing default outlines without replacing them is a common problem.
- Keyboard support: components like menus, tabs, dialogs and comboboxes need correct keyboard interaction patterns. The WAI-ARIA Authoring Practices Guide is a common reference.
- Semantic HTML first: a real button element rather than a clickable div. ARIA should supplement semantics, not replace them.
- Labels and names: inputs with labels, icon-only buttons with accessible names.
- Error messaging: tied programmatically to the relevant field, not only shown by color.
Documentation
- Include accessibility notes for each component: what it handles automatically and what product teams still need to do.
- Show do and don't examples.
Testing Automated tools catch some issues, but manual testing with keyboards and screen readers catches many more. Involving disabled users in testing is even better.
What accessibility feature is hardest to get right in your components? How does your team test it?
Comments · 4
Use real semantic elements, like button and label, instead of styled divs. You get keyboard and screen reader support nearly free.
Does the contrast check need doing for every colour pair? I'm tempted to just trust the palette.
Check the combinations you actually use. Text on background pairs are what matter, and tools can test them in seconds.
Focus rings get removed so often because they look "ugly". Making them part of the design is a kindness to keyboard users.