Run axe/lighthouse, fix a11y violations one by one until score meets threshold.
Start the "Accessibility Audit Loop" loop. - Goal: All critical and serious accessibility violations are resolved, Lighthouse accessibility score meets threshold (default 95+). - Max iterations: 10 - Between iterations run: `npx lighthouse http://localhost:3000 --only-categories=accessibility --output=json | jq '.categories.accessibility.score'` - Exit when: accessibility score >= 0.95 AND no critical/serious axe violations remain. Steps: 1. Run an accessibility audit (axe-core, Lighthouse, or pa11y) 2. If score meets threshold and no critical violations, stop — exit condition met 3. Sort violations by severity: critical > serious > moderate > minor 4. Fix the highest-severity violation first: - Missing alt text → add descriptive alt attributes - Color contrast → adjust text/background lightness values - Missing labels → add aria-label or associated label elements - Focus management → add tabindex, focus traps, skip links - Semantic HTML → replace divs with proper elements (nav, main, article) 5. Test the fix with a screen reader mental model — does it make sense non-visually? 6. Re-run the audit to verify the fix and check remaining violations Self-pacing instructions: After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when exit condition passes or max iterations reached. Give a short status update each pass.
How it works