explaingit

dequelabs/axe-core

7,148JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A JavaScript library that automatically tests websites for accessibility issues against WCAG guidelines, detecting problems like missing image descriptions or low color contrast with zero false positives.

Mindmap

mindmap
  root((repo))
    What it does
      Automated a11y testing
      WCAG compliance checks
      Zero false positives
    Tech stack
      JavaScript
      All major browsers
    Use cases
      Test suite integration
      CI pipeline checks
      iframe scanning
    Audience
      Web developers
      QA engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add automated accessibility checks to an existing test suite to catch WCAG violations on every code change.

USE CASE 2

Scan a specific page or component for accessibility issues during development before shipping.

USE CASE 3

Check whether form fields, images, and color contrast on a page meet WCAG 2.1 or 2.2 standards.

USE CASE 4

Test pages containing nested iframes for accessibility compliance across all frames.

Tech stack

JavaScript

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

Axe-core is a JavaScript library for automatically testing whether a website is accessible to people with disabilities. Accessibility testing checks things like whether images have text descriptions for screen readers, whether form fields have labels, whether color contrast is high enough, and whether a page can be used with a keyboard alone. Standards for this are set by the Web Content Accessibility Guidelines (WCAG), and axe-core checks against multiple versions of those guidelines (WCAG 2.0, 2.1, and 2.2) across different compliance levels. The library is designed to be added to an existing test suite rather than run as a standalone tool. After installing it via npm, you include a small JavaScript file in your test pages and call axe.run() at points in your tests where parts of the interface appear. It then scans the page, returns a list of violations found, and flags elements where it was uncertain as needing manual review. The authors claim it produces zero false positives, meaning everything it reports as a violation is a real problem, not a guess. According to the README, axe-core can automatically detect around 57% of WCAG issues. The rest require human judgment. For the issues it can detect, it runs quickly enough to be included in everyday testing without slowing down a development workflow. It works across all major browsers: Chrome, Firefox, Safari, Edge, and (in a deprecated mode) Internet Explorer 11. It handles iframes nested to any depth and can be configured to run only certain rules depending on the context. Localization is supported, meaning error messages can be translated to other languages, with translation files living in the locales directory. The project is open source and actively maintained by Deque Systems, an accessibility consulting company. It serves as the engine underlying several of Deque's commercial and free browser extension tools.

Copy-paste prompts

Prompt 1
How do I add axe-core to a Jest test so it automatically checks a React component for WCAG accessibility violations?
Prompt 2
Show me how to call axe.run() on a specific section of a page instead of scanning the entire document.
Prompt 3
How do I configure axe-core to run only WCAG 2.1 AA rules and skip experimental or best-practice checks?
Prompt 4
What does it mean when axe-core marks an element as incomplete versus a violation, and how should I handle each?
Prompt 5
How can I translate axe-core error messages into Spanish using the locales directory?
Open on GitHub → Explain another repo

← dequelabs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.