GitHub Action guide
A step-by-step guide to adding a11ign to a GitHub workflow: the workflow file, every setting, and what you get back.
What this does
a11ign runs in GitHub and puts its report on your pull request. You don’t need a machine of your own, an account or an API key.
Add it
name: a11ign
on:
pull_request:
workflow_dispatch:
jobs:
a11ign:
runs-on: windows-2022
timeout-minutes: 20
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: a11ign/a11ign@<full-40-character-commit>
id: a11ign
with:
url: https://example.com/contact
task: Send an enquiry
- uses: actions/upload-artifact@v7
if: always() && steps.a11ign.outputs.result-json != ''
with:
name: a11ign-result
path: |
${{ steps.a11ign.outputs.result-json }}
${{ steps.a11ign.outputs.summary-md }}- 1Save the file as .github/workflows/a11ign.yml.
- 2Pin a11ign by its full 40-character commit, not a tag or branch, so a new release never changes your build unasked.
- 3Open a pull request. The report appears as a comment. To find the latest release, run git ls-remote https://github.com/a11ign/a11ign "refs/tags/a11ign@*".
Settings you’ll use
urlThe page to test.
RequiredurlsSeveral pages, one per line. More than 5 needs max-pages, up to 25.
taskA label for the run. It also names the button the optional form check presses.
Default: Read and understand this pagefail-onFail the build on findings: never, any, blocker, serious, moderate or minor. Findings marked referred never count.
Default: neverprobe-formsSubmits forms with no valid input to hear whether errors are announced, and presses the button your task names. Use it only on a test app.
Default: offcomment-on-prPosts the report as a pull request comment, and updates it on later runs.
Default: onjudge-backendWho judges the transcript. The default is a11ign’s own model, which sends nothing anywhere.
Default: local
What you get back
findingsThe number of findings.
task-completableWhether someone using a screen reader could finish the task you named.
result-jsonThe full result, with the transcript behind every finding.
summary-mdThe report, ready to read.
The report also appears in the run’s job summary. Keep the result files with the upload step above, so you can check any finding later.
Good to know
It runs on Windows
It uses windows-2022, because NVDA only runs on Windows. GitHub provides the machine.
Your build is safe
Findings don’t fail your build unless you set fail-on.
Use it where it counts
Run it on the flows that matter, like checkout and sign-up, not on every commit. A run takes real screen reader time.