# Accessibility: Building Usable Components for Every Ability and Situation

> Learn who accessibility serves, the core checks each design system component must pass, and how to document accessible use so every team inherits it.

**In short:** Accessibility in a design system means every component passes core checks and is documented for accessible use, so people of every ability and situation can use it.

From "Design systems", a free course by Venkat R. Murty: https://designervenkat.online/learn/design-systems/accessibility

## What you will learn

Accessibility means that people with different abilities, devices, and situations can still use the products you design. In a design system, it is not a final check at the end of a project. It is built into the shared parts from the start. A button, text field, or badge that is accessible once can be reused by every team that imports it.

In this lesson you will learn who accessibility serves, why it is a baseline rather than an extra, and the core checks every component must pass. You will also see how to write accessibility rules into the system's documentation, and how one error state on a banking sign-in screen can be fixed step by step.

- **Accessibility:** Designing so that people with many kinds of ability, using many kinds of devices, can understand and use a product.
- **WCAG:** Web Content Accessibility Guidelines. A set of rules published by the W3C, the main web standards group, that describes how to make content usable by more people.
- **Contrast ratio:** A number that compares how light or dark two colors are next to each other, such as text and its background. Higher numbers mean easier reading.
- **Focus state:** The visible mark that shows which control is active when someone moves through a screen with a keyboard.
- **Touch target:** The area of a button or control that a person can press with a finger or pointer.
- **Keyboard operable:** A control can be reached and used with the keyboard alone, without a mouse or touch.
- **Semantic role:** The label that tells assistive technology what a control is, such as a button, a checkbox, or a dialog.
- **Assistive technology:** Tools that help people use screens, such as screen readers, magnifiers, and switch devices.

## Who does accessibility serve?

Many people think accessibility is only for people with lasting disabilities. It is wider than that. The people it serves have needs that last different lengths of time, and a good design system keeps all three in mind.

- **Permanent needs:** A need that stays for life. One example is a person who has only one arm. Another is a person who is blind or has low vision, or who is deaf or hard of hearing.
- **Temporary needs:** A need that lasts for a limited time, such as a broken wrist. Someone with a sprained wrist may find small targets hard to press for a few weeks.
- **Situational needs:** A need caused by the moment or the place. Someone holding a child in one arm, or using a phone in bright sunlight, has a limit for that moment only. A person in a noisy restaurant may miss a sound alert.

These needs cover four broad ability areas: vision, hearing, motor (movement and control of the body), and cognitive (thinking, memory, and attention). A design that helps a person with one need often helps others too.

> **Tip:** Some inclusive design writers prefer the words 'short-term injury' or 'situational limitation' over 'temporary disability'. They argue the older words can hide the real needs of disabled people. Use the wording your team agrees on, and keep disabled users at the center of your research.

Accessibility is a baseline in a design system. A baseline is the minimum that every part must meet before it ships. If each team had to add accessibility by hand, some would skip it. When the component already meets the checks, every product that uses it inherits the work.

WCAG has three levels: A, AA, and AAA. Level A covers the most basic needs. Level AA covers more, and specific regimes such as the EU and US Section 508 point to it. Level AAA is the strongest, but some of its rules are hard to meet for all content, so many teams treat it as a bonus. In this course, AA is the usual target for every core component.

- **Level A:** The basic rules. Failing them blocks many users from basic use, such as when color is the only signal.
- **Level AA:** The usual target. It sets the contrast, focus, and target size rules that most design systems adopt.
- **Level AAA:** The enhanced level. It asks for stronger contrast and extra features. Teams add these where they can, but they are not the required minimum.

## What core checks should every component pass?

Every core component should pass five checks before it is shared. The checks are simple, but they are easy to forget when you are busy, so write them into each component's rules.

- **Contrast:** Text, icons, and borders must stand out enough from what sits behind them.
- **Not color alone:** Meaning must reach people through more than color, such as a shape, a word, or a pattern.
- **Visible focus:** The active control must have a clear mark when someone reaches it with a keyboard.
- **Touch target size:** Controls must be big enough, or spaced far enough apart, to press without error.
- **Keyboard operation:** Every control must work with the keyboard alone.

Contrast comes first. WCAG level AA asks for a contrast ratio of at least 4.5 to 1 for normal body text. For large text, the target drops to 3 to 1. Large text is 18 point or larger, or 14 point and bold. Non-text parts that carry meaning, such as form borders, icons, and focus rings, also need 3 to 1 against the colors next to them.

$$
\text{Contrast ratio} = \frac{L_1 + 0.05}{L_2 + 0.05}
$$

Here L1 is the brightness of the lighter color and L2 is the brightness of the darker one. In words: add 0.05 to each brightness value, then divide the bigger number by the smaller. You do not need to calculate it by hand. Use a contrast checker tool, and record the result in the component notes.

> **Tip:** Test every state, not just the default. The text on a hover state, an active button, and an error message must each meet the target. A common miss is a brand color that passes on a large button but fails as small link text.

Not color alone is the second check. Some people are colorblind and cannot tell red from green. Others use screens that show colors poorly, or use a screen reader and never see color at all. If a red border is the only sign of an error, some people will miss it. Add an icon, a word, or a pattern so the meaning survives without color.

Visible focus is the third check. When someone presses Tab, one control becomes active. It needs a clear outline or highlight that stands out from the background. A focus mark that is hidden, faint, or covered by another element fails the user. WCAG 2.2 also asks that a focused item is not fully hidden by content placed on top of it.

> **Tip:** Do not remove the browser's default focus ring to make a screen look cleaner. Design a replacement that is at least as visible, and put it in the component rules so every product uses the same one.

Touch target size is the fourth check. WCAG 2.2 level AA asks that pointer targets be at least 24 by 24 CSS pixels. There is an exception: a smaller target can pass if it sits far enough from its neighbors that the 24 pixel circle around it does not overlap them. Aim for that size where you can. A later lesson covers the full size scale.

Keyboard operation is the fifth check. Every interactive component must be reachable and usable with the keyboard alone. People who cannot use a mouse, people who use a switch device, and screen reader users all depend on this. A design that works only with a mouse or hover fails them.

> **Tip:** A native button or checkbox from the platform already handles keyboard use and announcements. A custom shape drawn from scratch often does not. When you can, build from the platform's built-in control and style it.

**Quick check:** A teammate designs a 'Success' badge for a payment screen. It uses light green text on a white background, with no icon. Which answer names the best pair of problems?

A. The badge is too large, and the green is too bright for a payment screen.
B. The light green text may not reach the contrast target, and the badge relies on color alone, so use a darker text color, add a check icon, and add a clear word.
C. The badge should be a link, and it needs a longer label so screen readers can read it.
D. The badge needs a dark mode version, and its shape should be a circle instead of a rectangle.

**Answer:** B. The light text is likely too faint on white to meet 4.5 to 1, and color is the only signal. A darker green, a check icon, and a word like 'Paid' fix both.

## How do you document accessibility inside the system?

A check helps only if the next designer and developer can find it. Put accessibility rules in the design system's documentation, on the same page as the component. Then each product that uses the component inherits the rules by default.

Strong teams treat each component page as an accessibility contract. It says what the component promises to users and what a product team must still provide. Three parts matter most.

- **Role:** Name what the control is, such as button, checkbox, tab, or dialog. Choose the native element that already has this role, because it brings keyboard and announcement behavior with it.
- **Name:** Write the label a screen reader will read out. Icon-only buttons need a name, such as 'Delete item', because a picture alone says nothing to a screen reader user.
- **States:** List the states that must be announced, such as expanded, selected, checked, or invalid. A user who cannot see the screen must still hear the change.

The second part is expected keyboard behavior. Write down how the component responds to each key: the Tab order, the key that activates the control (often Enter or Space), arrow key movement inside groups, and Escape for closing. Also say where focus goes when a dialog opens and where it returns when it closes.

1. **Map the focus order:** Describe which control gets focus first and how focus moves to the next. Keep the order the same as the reading order on screen.
2. **Name the activation keys:** State which key presses the control, so the page says what a keyboard user should press.
3. **Describe the exit and return:** For a dialog or menu, say how it closes with Escape and where focus lands afterward. Users lose their place if focus jumps to the top of the page.

The third part is the accessible-use note. It is a short section that lists the rules a product team must follow when using the component. Note any exception, so teams know when they can and cannot change it.

- **Labels and help text:** Say which labels are required and where help text sits. A placeholder must never replace a label.
- **Validation timing:** Say when an error appears, for example after the user leaves a field, not on every key press.
- **Error recovery:** Say how the user can fix the problem and return to the right place on the page.
- **Contrast record:** Keep the measured contrast of each color pair with the component, so teams can see that it was checked.

> **Tip:** Keep each note short and specific. 'Make it accessible' helps no one. 'Escape closes the dialog and returns focus to the button that opened it' can be checked and built.

Testing supports the documentation. Move through the component with the Tab key and check that each step is visible and sensible. Also test with a screen reader and with zoom, because these show problems a checker can miss. Record the date and result next to the component.

## Worked example: fixing a sign-in error state

Imagine a banking app. The sign-in screen has a username field and a password field. When a user types the wrong password, the password field gets a red border, and nothing else changes. A person who cannot see red misses the error. A person using a screen reader hears nothing. Here is how to fix it using the core checks.

1. **Find the gap:** The only signal is a red border. That breaks the rule that color cannot be the only way to show meaning. Write this down as the problem to solve.
2. **Add an error icon:** Place a warning icon inside or beside the field. The shape gives a second signal that works without color. The icon is a non-text part that carries meaning, so it needs at least 3 to 1 against the background.
3. **Write a clear message next to the field:** Place a short text message under the password field. The wording is a separate writing task. In the component notes, state that the message must be linked to the field, so a screen reader reads it when the user moves there.
4. **Set the text color for contrast:** Choose an error text color that reaches at least 4.5 to 1 against the background. Check it with a contrast tool and record the result. A bright red that looks strong may fail on white.
5. **Check the border and focus:** Make sure the red border still reaches 3 to 1 against the background. Confirm that the focus mark on the field stays clear while the error shows.
6. **Check the touch target:** If a 'Forgot password' link sits near the error, check that its tap area is at least 24 by 24 CSS pixels, or that it has enough space around it.
7. **Document the result:** Add the error state to the input's accessibility note. Record the icon rule, the 4.5 to 1 text rule, the link between message and field, and the focus behavior. Every product that uses this input now gets the same fix.

After these steps the error has four signals: a red border, an icon, a text message, and readable text. A user who cannot see color still sees the icon and the words. A screen reader user hears the message at the right moment. A keyboard user sees the focus mark. The documentation means the next team does not need to repeat these decisions.

> **Tip:** Test the error in the real screen, not only in the design file. Check it at a larger text size and in low light on a phone, because situational needs show up there.

## Check your understanding

**Quick check:** A settings list has a small trash icon button at the end of each row. The icon is 20 by 20 CSS pixels, and the rows sit only 4 pixels apart. What is the best fix?

A. Keep the icon as it is, because the trash shape is easy to recognize.
B. Make the tappable area at least 24 by 24 CSS pixels or space it well from neighbors, and give the button a name such as 'Delete item' for screen readers.
C. Turn the icon into a red dot so it looks lighter on the page.
D. Remove the button and ask users to delete items from a long menu instead.

**Answer:** B. At 20 pixels the target is below the 24 pixel minimum, and rows 4 pixels apart do not give enough space. An icon-only control also needs a name so its purpose is announced.

**Quick check:** A team documents a custom pop-up menu. The note says Escape closes it. A reviewer asks for more. Which addition best completes the keyboard documentation?

A. Add the brand colors used for the menu background and text.
B. State how the menu opens, which keys move through its items, and where focus returns after it closes.
C. Add a note that the menu should appear faster on fast internet connections.
D. Say that the menu is only for desktop users so mobile teams can skip it.

**Answer:** B. Keyboard documentation covers how the menu opens, how a user moves inside it, and where focus lands on exit. Colors, speed, and device limits are other topics.

**Quick check:** A designer checks a new checkbox. The label text reaches 4.5 to 1 contrast, but the box border is pale grey, about 1.6 to 1 against white. Which statement is correct?

A. The component passes, because the text label meets the body text target.
B. The component fails the non-text rule, which asks for 3 to 1 against the background, so the border needs to be darker.
C. The component passes, because grey borders are common in major products.
D. The component fails only if the label is smaller than 14 point.

**Answer:** B. The label and the box border are checked separately. A part that carries meaning, like a checkbox border, needs at least 3 to 1 against its background, so 1.6 to 1 fails.

## Key takeaways

- **Build it in:** Accessibility is a baseline for every shared component, not an add-on. Each core component should ship with accessible defaults.
- **Think beyond disability:** Permanent, temporary, and situational needs all matter. Designing for a lasting need often helps people with short-term or moment-based needs too.
- **Use the five checks:** Check contrast, not color alone, visible focus, touch target size, and keyboard operation, for every component and every state.
- **Write it down:** Record roles, labels, keyboard behavior, and accessible-use notes in the component documentation, so the rules travel with the part.

> **Tip:** When you finish a component, ask: could a person who cannot see color, cannot use a mouse, and is in a noisy place still finish the main task? If not, the component is not ready to share.

## Sources

- [W3C, Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/)
- [Deque University, WCAG 2.2 Updates](https://dequeuniversity.com/resources/wcag-2.2/)
- [Addy Osmani, WCAG 2.2 Quick Reference (web-quality-skills)](https://github.com/addyosmani/web-quality-skills/blob/main/skills/accessibility/references/WCAG.md)
- [W3C, Guidance on Applying WCAG 2.2 to Mobile Applications (WCAG2Mobile)](https://w3c.github.io/matf/)
- [ADA Compliance Pros, WCAG 2.2 success criteria: thresholds, exceptions and US rules](https://www.adacompliancepros.com/blog/wcag-22-new-criteria-thresholds)
- [Web Accessibility Checker, WCAG 2.2 Color Contrast guide](https://web-accessibility-checker.com/en/blog/color-contrast-checker-wcag-guide)
- [ColorUI, The Ultimate WCAG Color Guide for Designers](https://colorui.io/learn/wcag-complete-guide)
- [A11yFlow, Color Contrast WCAG 2.2: A Developer's Fix Guide](https://www.a11yflow.dev/blog/color-contrast-wcag-developer-guide)
- [Accessibility Assistant, WCAG 2 Colour Contrast Guidelines](https://accessibilityassistant.com/blog/accessibility-insights/wcag-2-colour-contrast-accessibility-guidelines/)
- [Digital.gov, An advanced approach to accessibility](https://digital.gov/resources/an-advanced-approach-to-accessibility)
- [Uxcel, Inclusive Design Basics](https://uxcel.com/lessons/inclusive-design-103)
- [UXPin, Quick Guide to Inclusive Web Design](https://www.uxpin.com/studio/blog/inclusive-web-design/)
- [APCO Worldwide, Permanent, Temporary and Situational Barriers to Accessibility in UX Design](https://apcoworldwide.com/blog/understanding-the-permanent-temporary-and-situational-barriers-to-accessibility-in-ux-design/)
- [UX Wisdom, Disabilities in design](https://www.duradigital.com/post/ux-wisdom-accessibility-and-inclusive-design)
- [Frank Spillers, Why we need to ditch temporary disability in inclusive design](https://frankspillers.com/why-we-need-to-ditch-temporary-disability-in-inclusive-design/)
- [Ethnographic study of visual impairments for voice user interface design (arXiv)](https://arxiv.org/pdf/1904.06123)
- [Figr, Design System Accessibility Guide](https://figr.design/blog/design-system-accessibility)
- [Accesify, Accessibility in Design Systems: Build Accessible Components](https://www.accesify.io/blog/accessibility-design-systems-component-libraries/)
- [Last Rev, CDS Best Practices for Accessibility](https://lastrev.com/blog/accessibility-and-compliance-in-component-design-systems)
- [Better Design, How to create a design system: a practical guide](https://better-design.com/blog/how-to-create-a-design-system)
- [UXPin, UI Component Library Checklist: Essential Elements](https://www.uxpin.com/studio/blog/ui-component-library-checklist-essential-elements/)
- [ACM Queue, Design Systems Are Accessibility Delivery Vehicles](https://queue.acm.org/detail.cfm?id=3704443)
- [Medium, How to document accessibility as a UX designer](https://medium.com/design-bootcamp/how-to-document-accessibility-as-a-ux-designer-c51476104723)
- [accessibility.build, Building Accessible Design Systems: Inclusive Components](https://accessibility.build/blog/building-accessible-design-systems-architecture-inclusive-components)
