Getting started
Check every pull request for new accessibility issues. Setup takes about five minutes: a key, a secret and one workflow file.
Before you start#
You need a GetWCAG project for your website and a GitHub repository that can run Actions. Your app has to start in CI, or you need a staging or preview URL to check.
1. Create a key#
- Open your project in GetWCAG (opens in a new tab) and go to the CI checks tab.
- Click Create key and name it after the repository, like
acme/website. The key is shown once, so copy it now. - In GitHub, open the repository's Settings → Secrets and variables → Actions and add a secret named
GETWCAG_API_KEYwith the key as its value.
Use one key per repository. You can then revoke one without breaking the others, and see which repository last used each key. The Free plan includes one key.
2. Add the workflow#
Add this file to your repository. It builds your app, starts it, and checks it on the CI machine. Change the install, build and start commands to the ones your app uses.
name: Accessibility
on:
pull_request:
push:
branches: [main]
workflow_dispatch: # lets you run it by hand from the Actions tab
concurrency:
group: getwcag-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
getwcag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci && npm run build
- uses: GetWCAG-App/scan-action@v1
with:
api-key: ${{ secrets.GETWCAG_API_KEY }}
start: npm start
wait-for: http://localhost:3000
# Pages are found automatically. Optional: always check these too
# pages: /checkout, /signupYou don't need to list your pages: the action finds them from your sitemap and links. To check a staging or preview URL instead, see Configuration.
3. Set the baseline#
Pull requests are compared with your main branch, so main needs one finished run first. Push the workflow to main, or open Actions → Accessibility → Run workflow and run it on main. When the log says This run is now the baseline, comparisons start.
4. Open a pull request#
Every pull request gets a comment with new, fixed and remaining issues, and a link to the full results in GetWCAG. The check fails only when the pull request adds new serious or critical issues. Issues you already had never block a merge.
Pull requests from forks
GitHub doesn't give repository secrets to workflows from forks, so those pull requests are skipped with a notice instead of failing.
Next#
Read How it works to understand baselines and how pages are picked, or go straight to Configuration.