Skip to main content
Wright Websites

a11y-warden

audit WCAG 2.2 in static HTML

WCAG 2.2 accessibility audit of static HTML for CI: alt text, form labels, button/link names, inline colour contrast, lang, title, landmarks, ARIA roles/references, aria-hidden focus traps, tabindex.

  • 11/week on npm
  • 2★
  • MIT
  • v1.0.1
  • In use on this site
  • Accessibility
npx a11y-warden

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

a11y-warden

From the README

Most accessibility regressions are simple and machine-detectable: an image without alt text, an icon button with no name, a form field whose only label is its placeholder, grey-on-white text, a modal hidden with aria-hidden that still traps keyboard focus. a11y-warden reads every built HTML page, checks it against a focused set of WCAG 2.2 success criteria, and reports each problem with the file, line, severity, the criterion and a concrete fix. Record existing issues in a baseline file and CI fails only on new ones.

npx a11y-warden dist
npx a11y-warden dist --update-baseline   # record existing issues once
npx a11y-warden dist --baseline .a11y-baseline.json --fail-on medium
npx a11y-warden _site --format sarif > a11y.sarif

Where we use it

CI job on this site: a11y · audit:a11y · In use

Related service: Marketing websites