Getting Started with Accessibility Scanner
Last updated on
23 September 2021
The Accessibility Scanner module uses Deque's @axe-core/cli toolset for performing web accessibility scans.
Prerequisites
System Dependencies
To use the accessibility scanner module, you must install the following dependencies:
- Web Page Archive Drupal module
While the archiving and visual regression features of this module aren't needed for accessibility scanning, it does provide some basic capture and compare functionality that made for a good framework to build upon. - npm/node 14+
Since the accessibility scanner module relies on a node-based third-party tool set, you must have node.js/npm installed somewhere on the server, and it must be accessible via the same user your web server runs as. Please note, there are security risks with allowing the web server access node/npm, which is why it is highly recommended that you don't install this module on the same system you run your other Drupal sites on. - @axe-core/cli node module
The @axe-core/cli node module should be installed somewhere on your system.
Permissions
To follow along with this guide, you will need the following permissions:
- administer web page archive
- view web page archive results
- process axe cli historical results
-
view axe cli historical results
Setting Up Accessibility Scanner for the First Time
When you first install the module, you will need to configure your system:
- Go to Configuration -> System -> Web Page Archive.

- Click on the Settings tab.

- Under System Settings specify the full path to the NodeJS and NPM.

- Under @axe-core/cli - Accessibility Scanner Settings -> System Settings:

- Set Path to @axe-core/cli to the axe binary on your system
- It is highly recommended that you keep the "Verify binary checksum before executing?" checked. This means if that binary every got compromised, Drupal will not attempt to execute it. However, if you do this, you must manually set your expected checksum here. To get the current checksum you can run the following command on your system:
md5 /path/to/axeAlternatively, you can save the settings and come back to this screen and Drupal will tell you what the current checksum is the next time the page loads.
- If you did not install axe globally, you will need to set the node_modules path to the parent directory of the node_modules directory. So for example, if your node_modules directory is located at /path/to/node_modules, set this value to /path/to.
- Under @axe-core/cli - Accessibility Scanner Settings -> Default Values you can set your default preferences, including which accessibility guidelines you want to adhere to and which CSS selectors either what to include/exclude by default. These can get overridden on a per-job basis, but this will help setup new jobs more quickly.

Configuring a Scanner Job
- Familiarize yourself with creating capture jobs in web page archive. When you get to the Configuring Capture Utilities section, specify @axe-core/cli - Accessibility Scanner and then click the Add button.

- Configure the job according to your accessibility requirements.
- For reference, please review the axe tool's rule descriptions to know which rules are included in each guideline.
- It is specifically important to realize that stricter rulesets don't inherit their less-strict counterparts.
- For example, if you want WCAG 2.1 AA full compliance, if you only select the WCAG 2.1 Level AA guideline, it will not check for any violations against WCAG 2.1A, WCAG 2A or WCAG 2AA. It only will check for violations of rules that are tagged with wcag21aa. Instead you should include all four guidelines.
- Next learn about running capture jobs on web page archive.
- For information how to analyze reports:
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion