Uploading JSON Accessibility Results to Axe Reports

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

Using the bulk-reports subcommand to upload results to Axe Reports

Not for use with personal data

You can use the CLI to send results to Axe Reports with the subcommand bulk-reports. You'll need an API key, which is described in Obtaining an API Key.

To create the results files this command uses, see the section Generating Results below.

note

Uploading results with bulk-reports doesn't populate the usage metrics in Axe Reports (the Usage by Month and Scanned URLs reports). Those are populated by the usage service instead. See Viewing Your Usage Data in Axe Reports.

bulk-reports Command

axe bulk-reports <results-dir> --send-axe-reports --axe-reports-api-key <api-key>
note

Axe Reports requires that the report directory contain JSON results files.

Example

axe bulk-reports ./results --axe-reports-api-key 720abdd2-03a3-41bf-b820-0cc38af67057 --send-axe-reports

Options

Option Description
--send-axe-reports Necessary to indicate the Axe Reports results are to be uploaded in bulk.
--axe-reports-api-key The API key necessary to upload the reports to Deque's Axe Reports service.
--axe-reports-url (Optional) The URL of the Axe Reports server where the results will be uploaded. Defaults to https://axe-reports-server.dequecloud.com/. Set this only if your organization uses a different Axe Reports server.
--axe-reports-dimensions (Optional) Comma-separated list of JTBD (jobs-to-be-done) dimensions used to categorize the scan in Axe Reports. See JTBD Dimensions.

JTBD Dimensions

The --axe-reports-dimensions option tags the uploaded results with one or more JTBD (jobs-to-be-done) dimensions so that you can group and filter scans in Axe Reports. Dimensions are free-form labels that you choose, such as a team name, a release, or an application area; there is no fixed set of valid values. Separate multiple dimensions with commas:

axe bulk-reports ./results --send-axe-reports --axe-reports-api-key <your-API-key> --axe-reports-dimensions checkout,mobile-web

The dimensions are recorded on the project in the uploaded payload, not on individual pages, so they describe the upload as a whole.

The same option is available when testing a single page (see --axe-reports-dimensions) and when running a workflow spec file.

Environment Variable

Variable Description
AXE_REPORTER_API_KEY Your Axe Reports API key. For more information about obtaining an API key, see Obtaining an API Key. By putting your API key in an environment variable, you can avoid adding it to checked-in files in a Git repository.

The API key is the only value you can set with an environment variable. To upload to an Axe Reports server other than the default, use the --axe-reports-url option.

Obtaining an API Key

To obtain an API key, contact your Deque representative directly, reach us via our support desk, or send us an email. We'll be happy to help.

Generating Results

There are several ways to generate results for upload to Axe Reports. This section contains links to sample code showing how to generate accessibility results.

For Node.js and JavaScript examples, see Code Samples for the @axe-devtools/reporter Package

For other languages, see: