dequelabs /axe-core

Accessibility engine for automated Web UI testing

★ 7,826⑂ 994👁 172⑃ 2,825● 2,684▤ 104
HTMLMPL-2.0Created 2015-06-10www.deque.com/axe/
下载:Release 4.14.0Release-4.14.0 ↓4.14.02026-10-05
+1
日增长
7,826
stars
994
forks
172
watchers
2,825
prs
2,684
issues
104
releases

README

axe-core



![NPM downloads!](https://npm-stat.com/charts.html?package=axe-core&from=2017-01-01)





Axe is an accessibility testing engine for websites and other HTML-based user interfaces. It's fast, secure, lightweight, and was built to seamlessly integrate with any existing test environment so you can automate accessibility testing alongside your regular functional testing.

Sign up for axe news to get the latest on axe features, future releases, and events.

 The Accessibility Rules

Axe-core has different types of rules, for WCAG 2.0, 2.1, 2.2 on level A, AA and AAA as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an h1 heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored. The complete list of rules, grouped WCAG level and best practice, can be found in doc/rule-descriptions.md.

With axe-core, you can find on average 57% of WCAG issues automatically. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed.

To catch bugs earlier in the development cycle we recommend using the axe-linter vscode extension. To improve test coverage even further we recommend the intelligent guided tests in the axe Extension.

 Getting started

First download the package:

console
npm install axe-core --save-dev


Or, using pnpm:

console
pnpm add --save-dev axe-core


Now include the javascript file in each of your iframes in your fixtures or test systems:

html



Now insert calls at each point in your tests where a new piece of UI becomes visible or exposed:

js
axe
  .run()
  .then(results = {
    if (results.violations.length) {
      throw new Error('Accessibility issues found');
    }
  })
  .catch(err = {
    console.error('Something bad happened:', err.message);
  });


 Philosophy

The web can only become an accessible, inclusive space if developers are empowered to take responsibility for accessibility testing and accessible coding practices.

Automated accessibility testing is a huge timesaver, it doesn't require special expertise, and it allows teams to focus expert resources on the accessibility issues that really need them. Unfortunately, most accessibility tools are meant to be run on sites and applications that have reached the end of the development process and often don't give clear or consistent results, causing frustration and delays just when you thought your product was ready to ship.

Axe was built to reflect how web development actually works. It works with all modern browsers, tools, and testing environments a dev team might use. With axe, accessibility testing can be performed as part of your unit testing, integration testing, browser testing, and any other functional testing your team already performs on a day-to-day basis. Building accessibility testing into the early development process saves time, resources, and all kinds of frustration.

 A

Top issues

Latest release

Release 4.14.0 v4.14.0 2026-10-05
This release enables a new rule, and introduces new violations in some existing rules. These can cause the issue totals to go up from a previous version. Similarly we've included various bug fixes to false positives which may see the issue count go down as well. This release focused on various performance improvements which should speed runs up 20% - 40% on most pages. On especially large pages we've measured a 15x performance improvement.

 Features

- add EN 301 549 v4 tags to target-size (5361) (8200d2b), closes 5311
- i18n: add Azerbaijani locale (5385) (02e5fd4)
- label-content-name

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON