4.8.2 • Published 5 months ago

axe-core v4.8.2

Weekly downloads
4,959,070
License
MPL-2.0
Repository
github
Last release
5 months ago

axe-core

License Version Total npm downloads Commits GitHub contributors Join the chat at https://gitter.im/dequelabs/axe-core Package Quality

The Accessibility Engine for automated testing of HTML-based user interfaces. Drop the aXe on your accessibility defects!

Thanks for helping us to make axe-core the most widely used HTML accessibility testing library in the galaxy! Share your axe-core story using #axecoresquad or by submitting it here to get a sweet T-shirt.

Philosophy

We believe that automated testing has an important role to play in achieving digital equality and that in order to do that, it must achieve mainstream adoption by professional web developers. That means that the tests must inspire trust, must be fast, must work everywhere and must be available everywhere.

Manifesto

  1. Automated accessibility testing rules must have a zero false-positive rate
  2. Automated accessibility testing rules must be lightweight and fast
  3. Automated accessibility testing rules must work in all modern browsers
  4. Automated accessibility testing rules must, themselves, be tested automatically

The sharp edge of the aXe

aXe is the third generation of accessibility rules for HTML-based user interfaces that differentiates itself from other approaches and rules repositories in the following ways:

  1. It works on all modern browsers,
  2. It supports in-memory fixtures, static fixtures, integration tests and iframes of infinite depth
  3. It has zero false positives (bugs notwithstanding)
  4. It is open source
  5. It is actively supported by a major accessibility vendor
  6. It is designed to work with whatever tools, frameworks, libraries and environments you have today
  7. It is designed to be integrated into your existing functional/acceptance automated tests
  8. It automatically determines which rules to run based on the evaluation context
  9. It is highly configurable

Getting started

First download the package:

npm install axe-core --save-dev

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

<script src="node_modules/axe-core/axe.min.js" ></script>

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

axe.run(function (err, results) {
	if (err) throw err;
    ok(results.violations.length === 0, 'Should be no accessibility issues');
    // complete the async call
    ...
});

Supported Browsers

The aXe API supports the following browsers:

  • Internet Explorer v9, 10, 11
  • Google Chrome v42 and above
  • Mozilla Firefox v38 and above
  • Apple Safari v7 and above

The Accessibility Rules

The complete list of rules run by axe-core can be found in doc/rule-descriptions.md.

Contents of the API Package

The aXe API package consists of:

  • axe.js - the JavaScript file that should be included in your web site under test (API)
  • axe.min.js - a minified version of the above file

Localization

Axe can be built using your local language. To do so, a localization file must be added to the ./locales directory. This file must have be named in the following manner: <langcode>.json. To build aXe using this locale, instead of the default, run aXe with the --lang flag, like so:

grunt build --lang=nl

This will create a new build for aXe, called axe.<lang>.js and axe.<lang>.min.js. If you want to build localized versions, simply pass in --all-lang instead.

To create a new translation for aXe, start by running grunt translate --lang=<langcode>. This will create a json file fin the ./locales directory, with the default English text in it for you to translate. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below.

To update existing translation file, re-run grunt translate --lang=<langcode>. This will add new messages used in English and remove messages which were not used in English.

Contributing

Read the Proposing Axe-core Rules guide

Read the documentation on the architecture

Read the documentation on contributing

Projects using axe-core

List of projects using axe-core

Acknowledgements

Thanks to Dulin Marat for his css-selector-parser implementation which is included for shadow DOM support.

Thanks to the Slick Parser implementers for their contribution, we have used some of their algorithms in our shadow DOM support code.

eslint-plugin-jsx-a11y@plone/volto@storybook/addon-a11ytest-framework-commonkilli8n-react-native-fast-image@rock-kit/ui-axe-checkweb-accssbility-testaxe-for-jasmineeslint-plugin-jsx-a11y-div-fourtythreeeslint-plugin-jsx-a11y-div-thirtyseveneslint-plugin-jsx-a11y-div-thirtysixeslint-plugin-jsx-a11y-div-thirtythreeeslint-plugin-jsx-a11y-div-thirtytwoeslint-plugin-jsx-a11y-div-threeeslint-plugin-jsx-a11y-div-twelveeslint-plugin-jsx-a11y-div-twentyeslint-plugin-jsx-a11y-div-twentyeighteslint-plugin-jsx-a11y-div-twentyfiveeslint-plugin-jsx-a11y-div-twentyfoureslint-plugin-jsx-a11y-div-twentynineeslint-plugin-jsx-a11y-div-twentyoneeslint-plugin-jsx-a11y-div-fifteeneslint-plugin-jsx-a11y-div-fiftyeslint-plugin-jsx-a11y-div-fiftyeighteslint-plugin-jsx-a11y-div-fiftyfiveeslint-plugin-jsx-a11y-div-fiftynineeslint-plugin-jsx-a11y-div-fiftyoneeslint-plugin-jsx-a11y-div-fiftyseveneslint-plugin-jsx-a11y-div-fiftysixeslint-plugin-jsx-a11y-div-fiftythreeeslint-plugin-jsx-a11y-div-fiftytwoeslint-plugin-jsx-a11y-div-fiveeslint-plugin-jsx-a11y-div-foureslint-plugin-jsx-a11y-div-fourteeneslint-plugin-jsx-a11y-div-fourtyeslint-plugin-jsx-a11y-div-fourtyeighteslint-plugin-jsx-a11y-div-fourtyfiveeslint-plugin-jsx-a11y-div-fourtyfoureslint-plugin-jsx-a11y-div-fourtynineeslint-plugin-jsx-a11y-div-fourtyoneeslint-plugin-jsx-a11y-div-fourtyseveneslint-plugin-jsx-a11y-div-fourtysixeslint-plugin-jsx-a11y-diveslint-plugin-jsx-a11y-div-eighteslint-plugin-jsx-a11y-div-eighteeneslint-plugin-jsx-a11y-div-eleveneslint-plugin-jsx-a11y-div-sixtynineeslint-plugin-jsx-a11y-div-sixtyoneeslint-plugin-jsx-a11y-div-sixtyseveneslint-plugin-jsx-a11y-div-sixtysixeslint-plugin-jsx-a11y-div-sixtythreeeslint-plugin-jsx-a11y-div-sixtytwoeslint-plugin-jsx-a11y-div-teneslint-plugin-jsx-a11y-div-thirteeneslint-plugin-jsx-a11y-div-thirtyeslint-plugin-jsx-a11y-div-seventeeneslint-plugin-jsx-a11y-div-seventyeslint-plugin-jsx-a11y-div-seventyoneeslint-plugin-jsx-a11y-div-sixeslint-plugin-jsx-a11y-div-sixteeneslint-plugin-jsx-a11y-div-sixtyeslint-plugin-jsx-a11y-div-sixtyeigtheslint-plugin-jsx-a11y-div-sixtyfiveeslint-plugin-jsx-a11y-div-sixtyfoureslint-plugin-jsx-a11y-div-fourtytwoeslint-plugin-jsx-a11y-div-nineeslint-plugin-jsx-a11y-div-nineteeneslint-plugin-jsx-a11y-div-thirtyeighteslint-plugin-jsx-a11y-div-thirtyfiveeslint-plugin-jsx-a11y-div-thirtyfoureslint-plugin-jsx-a11y-div-thirtynineeslint-plugin-jsx-a11y-div-seveneslint-plugin-jsx-a11y-div-thirtyoneeslint-plugin-jsx-a11y-div-twentyseveneslint-plugin-jsx-a11y-div-twentysixeslint-plugin-jsx-a11y-div-twentythreeeslint-plugin-jsx-a11y-div-twentytwoeslint-plugin-jsx-a11y-div-twogql_din_modmutasi-bcacogoportutils@ladle/react-testklassi-demo-js@dnb-org/cypress-config@infinitebrahmanuniverse/nolb-axeexpand-react-bridgesklif-ui-kitsklif-apilighthouse@everything-registry/sub-chunk-1195@deepakorg/test@deepak757/testp149-tablesklif-uimachinebeemrcapslighthouse-pwalighthouse2lighthouse_cnlighthouse-normalize
4.8.1

7 months ago

4.8.0

7 months ago

4.8.2

6 months ago

4.7.2

10 months ago

4.7.1

11 months ago

4.7.0

12 months ago

4.6.1

1 year ago

4.6.0

1 year ago

4.6.3

1 year ago

4.6.2

1 year ago

4.5.0

1 year ago

4.5.2

1 year ago

4.5.1

1 year ago

4.4.3

2 years ago

4.4.2

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.3.4

2 years ago

4.3.5

2 years ago

4.2.4

2 years ago

4.3.3

3 years ago

4.3.2

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.3

3 years ago

3.1.3

3 years ago

3.5.6

3 years ago

3.3.4

3 years ago

3.2.4

3 years ago

4.0.3

3 years ago

3.0.4

3 years ago

3.4.3

3 years ago

4.2.2

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.5.5

4 years ago

3.5.4

4 years ago

3.5.3

4 years ago

3.5.2

4 years ago

3.5.1

4 years ago

3.5.0

4 years ago

3.2.3

4 years ago

3.4.2

4 years ago

3.3.3

4 years ago

3.4.1

4 years ago

3.4.0

4 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-beta.3

6 years ago

3.0.0-beta.2

6 years ago

3.0.0-beta.1

6 years ago

3.0.0-alpha.9

6 years ago

2.6.1

6 years ago

2.6.0

6 years ago

2.5.0

6 years ago

3.0.0-alpha.8

6 years ago

3.0.0-alpha.7

6 years ago

3.0.0-alpha.6

7 years ago

2.4.2

7 years ago

3.0.0-alpha.5

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

3.0.0-alpha.4

7 years ago

3.0.0-alpha.3

7 years ago

2.4.0-alpha.2

7 years ago

3.0.0-alpha.2

7 years ago

2.4.0-alpha.1

7 years ago

3.0.0-alpha.1

7 years ago

3.0.0-alpha-1

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.7

7 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago