run automated accessibility scans in cypress using the cypress-axe plugin's checka11y command

domain: docs.cypress.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. install cypress-axe and import 'cypress-axe' in the Cypress support file to register the custom commands
  2. call cy.injectAxe() after cy.visit() and before any accessibility check, since axe-core must be injected into the already-loaded page
  3. call cy.checkA11y() to scan the current DOM state and fail the test on any detected violations
  4. pass a context argument, e.g. cy.checkA11y('.modal'), to scope the scan to a specific region such as a dialog that just opened
  5. pass an options object with rules or includedImpacts to filter which severities and WCAG rules are enforced, and optionally a custom violation callback for reporting

Known gotchas

Related routes

run automated accessibility scans in playwright using @axe-core/playwright's axebuilder
github.com/dequelabs/axe-core-npm · 5 steps · unrated
Grant a third-party automation tool Accessibility permission to read/control other apps' UI via AXUIElement
developer.apple.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans