name: a11y-axe description: "Accessibility audit with axe-core via browser injection"
Accessibility Audit (axe-core)
Use the bash tool with npx to run accessibility audits.
Setup
Node.js (required for npx):
- macOS:
brew install node - Ubuntu:
sudo apt install nodejs npm
Use npx @axe-core/cli (no global install needed), or npm install -g @axe-core/cli for global install.
Quick Audit
npx @axe-core/cli <URL> --stdout 2>/dev/null | head -100
With Specific Rules
npx @axe-core/cli <URL> --tags wcag2a,wcag2aa --stdout 2>/dev/null
Specific Element
npx @axe-core/cli <URL> --include "#main-content" --stdout 2>/dev/null
WCAG Levels
| Tag | Standard |
|---|---|
| wcag2a | WCAG 2.0 Level A |
| wcag2aa | WCAG 2.0 Level AA |
| wcag21a | WCAG 2.1 Level A |
| wcag21aa | WCAG 2.1 Level AA |
| best-practice | Best practices |
Tips
- Focus on critical and serious violations first
- Use --include to scope audit to specific sections
- Run against localhost dev server for fastest results
- Combine with color-contrast skill for detailed contrast checks