Uploading JSON Accessibility Results to axe Reports

Link to Uploading JSON Accessibility Results to axe Reports copied to clipboard

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

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 Use axe Reports.

To create the results files used by this command see the section Generating Results below.

bulk-reports Command

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

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


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


Option Description
--send-axe-reports Necessary to indicate the axe reports 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) Indicates the URL of the server where the reports will be uploaded.

Environment Variables

Variable Description
AXE_REPORTER_API_KEY Your axe Reports API key. For more information about obtaining an API key, see Obtaining an API Key to Use axe Reports. By putting your API key in an environment variable, you can avoid adding it to checked in files in a Git repository, for instance.
AXE_REPORTS_URL (Optional) Specifies the URL where the results will be uploaded. Usually is the address of the axe Reports server.

Generating Results

There are several ways that you can 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: