Accessibility to WCAG 2.2 AA
Contrast of text/background pairs from the theme's CSS variables by the WCAG formula, alt on images, field labels, button names, heading order, lang on the page; color as the only signal and the keyboard are left to a judge.
Accessibility to WCAG 2.2 AA
Accessibility norms for a project with an interface: web pages, React, HTML lenses. Checks on the project's code (HTML, TSX, JSX, CSS) hold six norms; a judge holds two.
What it installs
- The page Accessibility: norms, settings (
minContrast, custom color pairs), what programs cannot see. - Norms:
- A11Y-R01: theme text contrast is at least 4.5:1 in all schemes; the
contrastcheck computes it by the WCAG formula from CSS variables (--x-foregroundon--x,--on-xon--x, custom pairs). - A11Y-R02: an
<img>has alt; thealtcheck. - A11Y-R03: a form field has a label; the
labelscheck. - A11Y-R04: a button and a link have a name; the
namescheck. - A11Y-R05: headings of an HTML page are in order, one
h1; theheadingscheck. - A11Y-R06:
<html>has lang; thelangcheck. - A11Y-R07: color is not the only signal; the judge
judges/color-alone.md. - A11Y-R08: keyboard, focus, 24 px target size, 3:1 border contrast, structure of the assembled page; the judge
judges/keyboard-and-structure.md.
- A11Y-R01: theme text contrast is at least 4.5:1 in all schemes; the
The checks stand on the library of the design-base package; where they look for files is on its page Which files the design checks look at.
Where the boundary is
- The checks read code, not a running page. A label or name that arrives through
{...props}or an expression is invisible to them: such places are skipped, not counted as violations. The package does not replace a full audit in a browser (axe, Lighthouse) and does not install one. - A program checks heading order only in HTML: in TSX it is assembled from different components, so a judge looks at it.
- Level AAA is not required; the contrast threshold can be raised with the
minContrastfield.