Accessibility · WCAG 2.2

A WCAG 2.2 checklist for component libraries

Accessibility implemented per page is re-implemented per page. These are the checks that belong in the component itself, plus what changed in WCAG 2.2 and how to test what automation cannot see.

WCAG 2.2 is the current recommendation, and its Level A and AA criteria are also the reference point for many legal and procurement requirements — including the European Accessibility Act, whose obligations have applied since 28 June 2025. A component library is the highest-leverage place to meet them: fix a dialog once and every product inherits the fix.

1. What changed in WCAG 2.2

WCAG 2.2 added criteria that matter directly to interactive components:

Criterion Level What it means for a component
2.4.11 Focus Not Obscured (Minimum) AA A focused control must not be completely hidden by sticky headers, footers, popovers or cookie banners.
2.5.7 Dragging Movements AA Sliders, sortable lists and drag handles need a non-drag alternative.
2.5.8 Target Size (Minimum) AA Pointer targets should be at least 24×24 CSS pixels, with defined exceptions.
3.2.6 Consistent Help A Help mechanisms appear in the same relative order across pages.
3.3.7 Redundant Entry A Do not ask for the same information twice in a process unless it is essential or auto-filled.
3.3.8 Accessible Authentication (Minimum) AA No cognitive function test for login without an alternative; allow paste and password managers.

Focus Appearance (2.4.13) is Level AAA, but its intent — a clearly visible focus indicator — is worth meeting at component level regardless, because focus visibility is also a practical usability requirement.

2. The component-level checklist

Keyboard

  • Every interactive element is reachable with Tab and operable with the expected keys.
  • Composite widgets follow the expected pattern: arrow keys inside a menu, tab list or grid; Esc to close overlays.
  • Focus is never trapped except inside a modal dialog, where it is contained and restored on close.
  • Focus order follows the visual order, including after dynamic content is inserted.
  • Custom controls do not swallow browser shortcuts or scroll keys unnecessarily.

Names, roles and states

  • Use native elements first. A button is better than a div with a role and three key handlers.
  • Every control has an accessible name, including icon-only buttons.
  • State is exposed: expanded, selected, checked, invalid, busy, current page.
  • Live regions announce asynchronous results — and do not announce on every keystroke.
  • Decorative icons are hidden from assistive technology; meaningful icons have a name.

Forms

  • Labels are programmatically associated, not just visually adjacent.
  • Required fields, formats and expected input are described before submission.
  • Errors are announced, tied to the field, and explain how to fix the problem.
  • Autocomplete tokens are set for common fields (name, email, address, one-time code).
  • Paste and password managers are not blocked.
  • Entering the same information again is avoided within a flow.

Focus and overlays

  • Dialogs, drawers and menus move focus in on open and return it to the trigger on close.
  • The page behind a modal is inert, including to screen readers.
  • Sticky headers and banners never completely cover the focused element.
  • Focus indicators have sufficient contrast and are not removed for aesthetics.

Pointer, touch and motion

  • Targets are at least 24×24 CSS pixels, or meet a documented exception.
  • Interactions that rely on dragging or a path-based gesture have a single-pointer alternative.
  • Hover-only content is also available on focus and on touch.
  • Animations respect prefers-reduced-motion; nothing flashes more than three times a second.
  • Orientation and text resizing to 200% do not break the component.

Colour and content

  • Text meets 4.5:1 contrast (3:1 for large text); UI boundaries and focus indicators meet 3:1.
  • Colour is never the only way to convey status; add text, icon or pattern.
  • Disabled states remain readable and are not the only explanation of why an action is unavailable.
  • Error messages and empty states are written in plain language.

3. Test beyond the automated scan

Automated tools catch a useful minority of issues — missing labels, some contrast failures, invalid ARIA. They cannot tell you whether a dialog feels right to a keyboard user or whether a screen reader announces a state change at the correct moment.

A practical test stack:

  1. Static checks in CI: lint rules for ARIA, axe or equivalent in component tests.
  2. Keyboard-only pass: complete the component’s primary task without a mouse. Watch where focus goes and whether it is visible.
  3. Screen-reader pass: at least one desktop pair (for example NVDA with Firefox or Chrome) and one mobile pair (VoiceOver with Safari, or TalkBack with Chrome). Listen to the name, role, state and error announcements.
  4. Zoom and reflow: 200% zoom and a 320 px viewport. Check that content does not clip or require horizontal scrolling.
  5. Reduced motion and high contrast: emulate both and confirm the component remains usable.

Test with disabled users, not only for them. A short usability session with someone who uses assistive technology will find issues no checklist predicts. Budget for it before a major release, not after a complaint.

4. Document the contract

For each component, publish:

  • The keyboard map.
  • Required accessible names and labels.
  • Announced states and live-region behaviour.
  • Known limitations and the recommended workaround.
  • Contrast and target-size notes for designers.

Documentation is part of accessibility: if a consuming team cannot tell what the component already handles, they will either duplicate it badly or remove it.

5. Common failures worth a lint rule

Pattern Why it fails Fix
<div onclick> Not focusable, no role, no keyboard activation. Use <button>.
outline: none Focus becomes invisible. Replace with a visible custom focus style.
Icon-only close button No accessible name. Add visually hidden text or aria-label.
Modal without inert background Screen readers and keyboard users escape the dialog. Use a tested dialog primitive with focus management.
Error colour only Status is lost without colour perception. Add an icon and text message, tied to the field.
Auto-advancing carousel Content moves before it can be read. Pause control, no autoplay, or respect reduced motion.

6. The short version

  • Native semantics first; ARIA only to fill a gap.
  • Keyboard, focus and announcements are component responsibilities.
  • WCAG 2.2’s new criteria are mostly about focus, targets, dragging and forms — design them in, not on.
  • Automate what can be automated, then test by keyboard and screen reader.
  • Document the accessibility contract and keep it in the same release as the code.
  • Fix once in the library, benefit everywhere.

Accessibility is not a separate project that runs after the component ships. At component level it is cheaper, more consistent and far more likely to survive the next redesign. That is the whole argument for putting it in the design system.

Related reading: how accessibility fits into the component API in Design systems that survive, and the performance checks that overlap with interaction quality in the Angular performance checklist.

Back to top