API Reference

axe-core

Accessibility testing engine that analyzes rendered pages against WCAG rules and returns violations.

Official Documentation ↗
CompatibilityThis documentation covers version v4.9. Check the official docs for the latest API surface.

Installation

npmnpm install axe-core

Methods

axe-core injects into a browser or jsdom page and reports accessibility violations with CSS selectors.

Key Features

  • WCAG rule sets and tagging
  • Violation details with selectors and fixes
  • Runs in browser or jsdom environments

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

FAQ

Why do some rules show as incomplete?
Incomplete means axe cannot decide automatically, often because color contrast depends on rendered pixels. Review these manually.
How do I limit the rules that run?
Use runOnly with a tag or rule id list so only the WCAG level you target is enforced, keeping reports focused.
Does axe-core fix issues?
No. It detects and explains violations with selectors; remediation still requires code changes.