Design Systems · Lesson 09 / 13
Accessibility
Building accessibility into a design system: who benefits, WCAG and POUR, colour and contrast, keyboard and focus, screen readers and semantics, ARIA basics, target sizes, motion, testing and documentation.
5 min read · 5 quiz questions
Why accessibility belongs in the system
Accessibility means people with disabilities can perceive, understand, navigate and interact with your product. The World Health Organization estimates that about 1.3 billion people — around 1 in 6 — experience significant disability. Many more have temporary or situational limitations: a broken arm, bright sunlight, a noisy room, a slow connection.
A design system is the most effective place to solve accessibility. When a button handles focus correctly, every screen that uses it inherits that. When a colour token passes contrast, every component using it passes. Fix it once, benefit everywhere.
In many countries accessibility is also a legal requirement — for example the European Accessibility Act, which applies to many products and services from June 2025, and the ADA in the United States.
WCAG and the POUR principles
The Web Content Accessibility Guidelines (WCAG), published by the W3C, are the international standard. WCAG 2.2 is the current version. Success criteria have three levels — A, AA and AAA — and AA is the level most organisations and laws target.
WCAG is organised around four principles, known as POUR:
| Principle | Meaning | Examples |
|---|---|---|
| Perceivable | People can perceive the information | Text alternatives, captions, sufficient contrast, not relying on colour alone |
| Operable | People can operate the interface | Keyboard access, enough time, no seizure-triggering flashes, clear focus |
| Understandable | Information and operation are understandable | Clear language, predictable behaviour, helpful error messages |
| Robust | Works with assistive technologies | Valid semantic HTML, correct names, roles and states |
Colour and contrast
- Text: at least 4.5:1 contrast (3:1 for large text — 24px, or 18.66px bold).
- UI components and meaningful graphics (input borders, icons, focus rings): at least 3:1 against adjacent colours.
- Never use colour as the only way to convey information — pair it with text, icons or patterns.
- Bake contrast into the token system and document approved pairings.
Keyboard and focus
Many people navigate without a mouse — keyboard users, switch users, screen reader users. Every interactive component must work with the keyboard.
- Visible focus: every focusable element shows a clear focus indicator (
:focus-visible). Never remove outlines without a better replacement. - Logical order: focus follows the visual reading order.
- Focus management: when a modal opens, focus moves into it and is trapped there; when it closes, focus returns to the element that opened it.
- Skip link: a "Skip to main content" link lets keyboard users bypass repeated navigation.
| Key | Expected behaviour |
|---|---|
| Tab / Shift+Tab | Move focus to the next / previous interactive element |
| Enter | Activate links and buttons; submit forms |
| Space | Activate buttons; toggle checkboxes |
| Arrow keys | Move within a group: radio buttons, tabs, menus, sliders |
| Escape | Close dialogs, menus and popovers |
:focus-visible {
outline: 2px solid var(--color-border-focus);
outline-offset: 2px;
}Semantics and screen readers
Screen readers (VoiceOver, NVDA, JAWS, TalkBack) read the page's structure and announce each element's name, role and state. Semantic HTML provides these automatically.
- Use native elements:
<button>for actions,<a href>for navigation,<input>with<label>for fields. A<div onclick>has no role, no keyboard support and no focus. - Use headings (
h1–h6) in a logical outline — screen reader users often navigate by headings. - Use landmarks:
<header>,<nav>,<main>,<footer>. - Give every image meaningful alt text, or
alt=""if decorative. - Give icon-only buttons an accessible name.
- Announce dynamic changes (e.g. "3 results found", form errors) with live regions.
<!-- ✗ Not accessible -->
<div class="btn" onclick="save()">Save</div>
<!-- ✓ Accessible -->
<button type="button" onclick="save()">Save</button>
<!-- Icon-only button -->
<button type="button" aria-label="Close dialog"><svg aria-hidden="true">…</svg></button>
<!-- Announce status changes -->
<p role="status" aria-live="polite">3 results found</p>ARIA: use with care
ARIA (Accessible Rich Internet Applications) attributes add or change roles, names and states for assistive technologies — for custom widgets like tabs, comboboxes and dialogs.
The first rule of ARIA is: if a native HTML element does the job, use it instead. Incorrect ARIA is worse than no ARIA, because it gives screen readers wrong information.
aria-label/aria-labelledby— give an element an accessible name.aria-describedby— link help text or errors to a field.aria-expanded— whether a disclosure, menu or accordion is open.aria-current="page"— the current item in navigation.aria-invalid="true"— a field with an error.- Follow the WAI-ARIA Authoring Practices for keyboard and ARIA patterns of complex widgets.
Targets, text and motion
- Target size: WCAG 2.2 AA requires at least 24×24 CSS px (with exceptions); 44–48px is recommended for touch.
- Text resize: content works when text is enlarged to 200% and with increased text spacing.
- Reflow: content works at 320px width without horizontal scrolling (except for things like data tables and maps).
- Motion: respect
prefers-reduced-motion; avoid flashing more than three times per second. - Timeouts: warn users and allow them to extend time limits.
- Language: set the page language (
lang="ar") so screen readers pronounce text correctly.
Testing and documenting accessibility
- 1Automated checks (axe, Lighthouse, Figma contrast plugins) catch some issues — often cited as roughly a third or less — quickly.
- 2Keyboard test: unplug the mouse and complete key tasks.
- 3Screen reader test with VoiceOver (Mac/iOS), NVDA (Windows) or TalkBack (Android).
- 4Zoom test at 200% and 400%, and at 320px width.
- 5Test with disabled people — nothing replaces their real experience.
- 6Document for each component: keyboard behaviour, focus management, ARIA used, and what product teams must still provide (like labels).
Common mistake: Treating accessibility as a final audit before launch. By then, fixes are expensive. Build it into tokens, components and the definition of done for every component.
Key takeaways
- Solving accessibility in the design system means every product inherits it.
- WCAG 2.2 level AA is the usual target, organised around POUR: Perceivable, Operable, Understandable, Robust.
- Ensure contrast, keyboard support, visible focus and correct focus management in every component.
- Prefer semantic HTML; use ARIA only when native elements can't do the job.
- Test with automated tools, keyboard, screen readers, zoom and real disabled users — and document accessibility per component.
Exercise
Audit a component's accessibility
- Pick a modal, dropdown or tabs component on a website.
- Use it with only the keyboard: can you open, operate and close it? Where does focus go?
- Turn on VoiceOver or NVDA and listen to how it's announced.
- Check contrast of text, borders and the focus indicator.
- Write the accessibility section of its documentation, including what's broken.
Test yourself
Accessibility quiz
5 questions. Score 70% or more to complete the lesson.
