Accessibility checks
docslit check a11y runs axe-core in headless Chromium against a built site. It finds problems that validate and lint can't see, such as low color contrast, missing labels and invalid ARIA.
Set up
The check needs Playwright, axe-core and a Chromium browser in your project:
DocsLit finds both packages in your project even when you run it with npx.
Run the check
The command reads a built site, so build first:
DocsLit serves the output folder itself and respects basePath. For every page, it loads the page in a light and a dark theme, waits for components to load, and freezes animations so contrast is measured on the final colors.
wcag2a, wcag2aa, wcag21aa or wcag22aa.light, dark or both.text, json or github (Actions annotations).minor, moderate, serious or critical.Exit codes
--fail-on impact.--fail-on impact, or the check couldn't run: Playwright or axe-core is missing, or the output folder has no built pages.Run it in GitHub Actions
With --format github, each violation shows up as an annotation on the run.