Accessibility checks for designers and front-end work
These are the checks that most often fail in generated UI. Target WCAG 2.2 level AA.
- Contrast: text 4.5:1 (large text 3:1); UI components and focus indicators 3:1. Run
scripts/contrast.py. - Focus: every interactive element shows a visible focus indicator (
:focus-visible). Focus order follows visual order. Nothing traps focus except open modals, which also close on Escape and return focus to the trigger. - Semantics: buttons are
<button>, links are<a href>, headings are in order, form fields have<label>s, landmarks (header,nav,main,footer) exist. - Names: icon-only buttons have
aria-label; images have meaningfulaltoralt=""if decorative. - Color independence: status, errors and chart series are distinguishable without color.
- Text resize and reflow: usable at 200% zoom and at 320 CSS px width without horizontal scrolling of the page.
- Target size: at least 24 by 24 CSS px (WCAG 2.2 AA, criterion 2.5.8); aim for 44 by 44 on touch.
- Motion: respect
prefers-reduced-motion; no flashing more than three times per second; autoplaying motion can be paused. - Forms: errors identified in text and linked to fields; required fields indicated; labels persist while typing.
- Language and titles:
<html lang>set; each page has a unique, descriptive<title>.
Automated tools catch only part of these. Keyboard-test every new flow: Tab through it, operate it with Enter and Space, and close overlays with Escape.