Runs axe-core accessibility checks on HTML snapshots.
Usage
With no arguments, checks ALL existing snapshots:
mix excessibilityWith arguments, runs tests first then checks NEW snapshots only:
# Run a test file
mix excessibility test/my_app_web/live/page_live_test.exs
# Run a specific test by line number
mix excessibility test/my_app_web/live/page_live_test.exs:42
# Run tests with a tag
mix excessibility --only a11y
# Run a describe block
mix excessibility test/my_test.exs:10
# Scan each snapshot at several widths (WCAG 1.4.10 Reflow only
# shows up at narrow viewports)
mix excessibility --viewports 1440x900,320x800
# Also flag interactive elements that are mostly outside the
# visible area, and page-level horizontal overflow
mix excessibility --viewports 1440x900,320x800 --check-clippingConfiguration
:axe_disable_rules- List of axe rule IDs to disable (default:[]):viewports- List of{width, height}tuples to scan each snapshot at (default: single 1280x720 scan). Equivalent to the--viewportsflag; the flag wins when both are given.:check_clipping- Flag interactive elements whose visible width falls below:clipping_ratio, plus page-level horizontal overflow (default:false). Equivalent to the--check-clippingflag.:clipping_ratio- Minimum visible-width ratio before an element counts as clipped (default:0.9):excessibility_output_path- Base directory for snapshots (default:"test/excessibility"):cross_snapshot_enabled?- Diff consecutive snapshots of the same test to flag content that changed without anaria-liveregion (default:true). Only fires on snapshots that carry capture metadata.
Prerequisites
Run mix excessibility.install first to install axe-core and Playwright via npm.