Documentation / Axe

Axe

Axe is an accessibility testing engine for websites and other HTML-based user interfaces.

Run #

You enable testing with --axe.enable.

docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:33.6.0 --axe.enable https://www.sitespeed.io

That will run axe-core and generate a new axe tab in your HTML result. The number of violations (per type) will automatically be sent to Graphite/InfluxDB.

Rules #

See the full list of the tested accessibility rules when you run Axe.

Configure Axe #

You can configure Axe which rules/checks that will be used.

You need to read Axe official documentation to get a feeling for what you can configure with Axe. In the axe namespace we pass on all parameters to the configuration object of Axe. --axe.checks will result in a configuration object like:

checks: {

}

That way you can configure all things you can configure in the Axe configuration.

However you probably just want to configure run options, you can do that with adding a run prefix. Say for example you only want to test wcag2aa compliance, you can do that with the runOnly configuration in AXE. You can do that with a configuration like:

{
    "axe": {
        "run": {
            "runOnly": ["wcag2aa"]
        }
    }
}

If you wanna avoid having over complicated cli-parameters you should use the configuration as JSON feature.

How it works behind the scene #

The Axe tests are run as a postScript.

Running Axe will add some extra run time per test. How long extra time it takes depends on your page and the server running the browser.