A GitHub Action to lint for any accessibility issues in your pull requests.
Required Your API key for axe-linter.
Optional The URL for the axe-linter API. Defaults to https://axe-linter.deque.com.
* To request an API key for axe-linter, please visit accessibility.deque.com/linter-contact-us. Once provisioned please visit https://docs.deque.com/linter/1.0.0/en/axe-linter-api-key to get your API key.
Create a file in your repository called .github/workflows/axe-linter.yml with the following contents:
name: Lint for accessibility issues
on:
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true # Cancel things if new events come in to conserve resources.
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read # Required to check out the repository
pull-requests: read # Required to read the pull request
steps:
- name: Checkout Repository
uses: actions/checkout@<commit-sha> # v6.0.2
- name: Run Axe Linter
uses: dequelabs/axe-linter-action@<commit-sha> # v2.x.y
with:
api_key: ${{ secrets.AXE_LINTER_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}The example above pins each action to a full-length commit SHA, with a trailing comment noting the human-readable version it corresponds to. This is the recommended approach for supply-chain safety — the action you run can never change underneath you:
- uses: dequelabs/axe-linter-action@<commit-sha> # v2.x.yReplace each <commit-sha> with a SHA from that action's own releases or
tags page — for axe-linter-action, its
releases or
tags page — and let
Dependabot
keep the pins up to date for you.
Every run writes a job step summary to the workflow run page with a detailed accounting of what happened:
- All findings, grouped per file — not just the first few. GitHub caps inline annotations at 10 per step, so the summary is the place to see the complete list.
- Skipped files (empty or over the size limit) and why they were skipped.
- On failure, a clear explanation and the error, so a run that goes wrong is easier to debug.
There is a limitation on the amount of annotations that can be made per step.
- 10 warning annotations
- 10 error annotations
If there are more errors, they will not appear as inline annotations. All findings are still listed in full in the step summary, and the complete details are also available in the action logs.
Additional information can be found in this GitHub discussion.
Individual files larger than 900,000 bytes are skipped and logged as a warning. The axe-linter API has a 1 MB request size cap, so oversized files are filtered out pre-emptively to avoid 413 server request errors.