Skip to content
Becoming a design system designer

Part 09 of 14 · · 5 min read

Accessibility: build it into the system once

The WCAG principles, a designer’s WCAG 2.2 checklist for contrast, focus and target size, and how keyboard and screen reader users move through a UI.

Accessibility means everyone can use the product, whatever their sight, hearing, movement or cognition. In a design system it pays off twice: fix contrast, focus and keyboard behaviour once in a component, and every screen built with it inherits the fix.

It also helps far more people than the label suggests. Captions help in a noisy room, good contrast helps in bright sunlight, and keyboard shortcuts help power users. Accessibility is mostly good design, written down precisely.

WCAG and the four principles

The Web Content Accessibility Guidelines (WCAG), published by the W3C, are the shared standard. The current version is WCAG 2.2. Every guideline sits under one of four principles, known as POUR:

PrincipleQuestion it asksExamples
PerceivableCan people see or hear the content?Text alternatives for images, enough contrast, captions
OperableCan people use the controls?Everything works by keyboard, enough time, nothing that flashes dangerously
UnderstandableCan people follow it?Plain language, predictable behaviour, help with errors
RobustDoes it work with assistive technology?Semantic HTML, correct names, roles and states

Each success criterion has a level: A is the minimum, AA is what most laws and companies target, and AAA is the strictest. Aim for AA.

A designer’s checklist

Most of WCAG is about content and code, but a large part is decided in design. These are the criteria a designer controls most directly, at level AA unless noted:

TopicWhat to check
Text contrastAt least 4.5:1 for normal text. Large text, 24px regular or about 18.66px bold and up, needs 3:1
Non-text contrastAt least 3:1 for the parts that identify controls and their states, such as input borders, icons and focus indicators
Use of colourColour is never the only way to show meaning. Add an icon, text or a pattern (level A)
Focus visibleKeyboard focus is always visible. In WCAG 2.2, the focused element must not be fully hidden by sticky headers, banners or other content
Target sizePointer targets are at least 24×24 CSS px, or have enough space around them. Platform guidance goes further: 44×44 pt on Apple platforms, 48×48 dp in Material
LabelsEvery input has a visible label. A placeholder disappears on typing, so it can’t be the label
ErrorsErrors are described in text, with a suggestion for how to fix them where possible
MotionAnything that moves, blinks or scrolls on its own for more than five seconds can be paused (level A). Respect the reduced-motion setting too
Text resizeText can be zoomed to 200% without losing content or function
ReflowContent works at a width of 320 CSS px without scrolling in two directions
HeadingsHeadings show the page structure. Keep levels in order, H1 then H2 then H3, without skipping
DraggingAnything that needs dragging also works with a single pointer, such as buttons or a tap to select then tap to place (new in 2.2)

WCAG 2.2 also added criteria about consistent placement of help, not asking people to enter the same information twice, and sign-in that doesn’t depend on a memory or puzzle test. They are worth knowing when you design forms and authentication flows.

Designing for the keyboard

Many people navigate entirely by keyboard, or with switches and other devices that act like one. A few rules cover most of what design needs to specify:

  • Tab order follows visual order. If the order isn’t obvious from the layout, annotate it in the design file.
  • Modals manage focus. When a modal opens, focus moves into it and stays there; Esc closes it; on close, focus returns to the control that opened it.
  • A skip link. A “Skip to content” link as the first focusable element lets keyboard users jump past the navigation.
  • A focus state for every interactive component. Design it as a real state next to hover and pressed, not as an afterthought left to the browser.

css

.button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
Show a clear ring for keyboard focus without adding one on every mouse click.

Designing for screen readers

A screen reader reads the interface aloud, using the names, roles and states the code exposes. Design decides much of what it says:

  • Icon-only buttons need a name. Annotate it in the design, for example “accessible name: Delete database”, so it isn’t left to guesswork in build.
  • Images need a purpose. Decide whether an image carries information, and needs alt text, or is decorative and should be skipped.
  • Native elements first. The first rule of ARIA is not to use it when a native HTML element does the job. A real <button> is focusable and works with Enter and Space for free; a <div> with a click handler is neither.

html

<!-- Works by keyboard and is announced as a button -->
<button type="button" aria-label="Delete database">
  <svg aria-hidden="true">…</svg>
</button>

<!-- Avoid: not focusable, no role, no keyboard support -->
<div class="icon" onclick="remove()">…</div>

Tools

WhereTools
FigmaContrast checker plugins such as Stark, and annotation kits for focus order and accessible names
BrowserLighthouse, axe DevTools and WAVE for automated checks
Screen readersVoiceOver on macOS and iOS (⌘F5 toggles it on a Mac), NVDA on Windows
Colour visionFigma’s colour blindness preview, or the Rendering panel in Chrome DevTools
Automated checks find only part of the problems. Always try the keyboard and a screen reader yourself.

Baking it into the system

Accessibility is a feature of the component, not a pass at the end of a page. A design system makes it part of every layer:

  • Tokens: colour pairs that are checked for contrast before anyone uses them.
  • Components: focus states, keyboard behaviour and accessible names designed and built in.
  • Documentation: an accessibility section on every component page.
  • Process: an accessibility review before each release.

Try this

Put your mouse away and use a product you know with only the keyboard for five minutes. Note where focus disappears, where the order jumps, and which controls you can’t reach. Then run its main text and border colours through a contrast checker.

Next in the series

Reduced motion came up in the checklist, and motion deserves its own part. Part 10 covers motion and micro-interactions: durations, easing, what animation is for, and how to keep it helpful rather than distracting.

Sources and further reading

See a design system in practice: the AppsCode Design System case study