Action distribution rollout: We are publishing the standalone public Action repository (JoeAzar/a11ydrift-action) ahead of GitHub Marketplace listing. Paid workspaces can already integrate baseline-diff CI results directly via POST /api/scans/ci using an API key from Workspace Settings.

Standalone Action

Runs Playwright + axe-core on GitHub Actions runners with baseline diffing and OASIS SARIF 2.1.0 Code Scanning output.

Baseline-diff only

Commit a11ydrift-pr-report.json to .a11ydrift/baseline.json (or sync via api-key) so checks fail only on new regressions.

Capped monthly runs

Paid workspaces include fixed monthly caps: 100 runs/mo (Starter), 500 (Agency), or 2,000 (Scale) at ≤20 URLs/run.

Quickstart workflow

Save as .github/workflows/a11y-gate.yml and replace PREVIEW_URL with your staging or preview deployment URL.

Get workspace API key
.github/workflows/a11y-gate.yml
name: A11yDrift WCAG 2.2 AA PR Gate

on:
  pull_request:
    branches: [main]

permissions:
  contents: read
  pull-requests: write
  security-events: write

jobs:
  a11y-pr-gate:
    runs-on: ubuntu-latest
    env:
      # Replace with your Vercel, Netlify, or Cloudflare Pages preview URL
      PREVIEW_URL: https://staging.your-app.com
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Run A11yDrift PR check
        uses: JoeAzar/a11ydrift/apps/github-action@main
        with:
          base-url: ${{ env.PREVIEW_URL }}
          # Up to 20 preview URLs or relative paths (hard cap: 20)
          urls: |
            /
            /pricing
            /products/sample-item
            /checkout
          max-urls: "20"
          fail-on: serious
          # Optional: ignore known issues so only new regressions fail the build
          baseline-file: .a11ydrift/baseline.json
          # Optional: omit for free public-repo checks; add api-key for workspace sync
          api-key: ${{ secrets.A11YDRIFT_API_KEY }}
          api-url: https://a11ydrift.com/api/scans/ci
          domain-id: ${{ vars.A11YDRIFT_DOMAIN_ID }}
          comment-on-pr: "true"
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Upload SARIF to GitHub Code Scanning
        if: always() && hashFiles('a11ydrift-pr-report.sarif') != ''
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: a11ydrift-pr-report.sarif
          category: a11ydrift-wcag-22-aa

What appears on your PR

Each push updates one comment in place, listing new regressions and collapsing baseline issues.

github-actions[bot]Failed: 2 new regressions10 URLs · 96.4% less noise
a11ydrift-pr-report.json · a11ydrift-pr-report.sarif
New WCAG 2.2 AA regressions
SeverityRuleSelectorRouteHits
CRITICALbutton-nameheader > button.promo-dismiss/*10
SERIOUScolor-contrastmain > .pricing-card > .subtext/pricing4
14 baseline issues collapsed (not blocking merge)
Matched against .a11ydrift/baseline.json. Fix legacy issues on your own schedule and refresh the baseline from outputs.report-path.

GitHub Code Scanning (OASIS SARIF 2.1.0)

Every run writes a11ydrift-pr-report.sarif (OASIS SARIF 2.1.0) alongside the JSON report—keep security-events: write and the final SARIF upload step in the quickstart workflow above to surface regressions in the Security tab and PR Code Scanning checks.

Inputs

Inputs for JoeAzar/a11ydrift/apps/github-action@main
InputRequiredDefaultDescription
urlsYes—Newline- or comma-separated preview URLs (or relative paths when base-url is set). Hard cap of 20 URLs per run.
base-urlNo""Optional base URL prefix (e.g. https://staging.your-app.com) applied to relative paths in urls.
max-urlsNo20Maximum URLs per run (hard ceiling: 20). Counts over 20 fail fast to keep CI predictable.
fail-onNoseriousMinimum severity that fails the PR check: critical | serious | moderate | minor | none.
baseline-fileNo""Path to a JSON baseline of known fingerprints (e.g. .a11ydrift/baseline.json as a string array, { fingerprints }, or a prior a11ydrift-pr-report.json).
api-keyNo""Workspace API key from /dashboard/settings. Not needed on public repos; syncs baselines and tracks private-repo quotas.
api-urlNohttps://a11ydrift.com/api/scans/ciCI sync endpoint used when api-key is set.
domain-idNo""Verified A11yDrift domain ID linked to this repo when api-key is set.
comment-on-prNotruePost or update a single accessibility comment on the pull request (true | false).
github-tokenNo${{ github.token }}GitHub token used to post or update PR comments.

Outputs

Outputs for downstream workflow steps
OutputDescription
new-regressionsCount of new WCAG 2.2 AA regressions compared to your baseline.
total-clustersTotal deduplicated template clusters across scanned URLs.
raw-violationsRaw page-level axe-core errors before template deduplication.
noise-reduction-pctPercentage of raw errors collapsed into template clusters.
report-pathPath to the generated JSON report (a11ydrift-pr-report.json), reusable directly as a baseline-file. A companion OASIS SARIF 2.1.0 file (a11ydrift-pr-report.sarif) is written alongside it.
Picking a plan: Shipping ~12 PRs a week uses ~52 runs/month—well inside Starter ($49/mo · 100 runs/mo). Multi-repo agencies use Agency (500 runs/mo) or Scale (2,000 runs/mo).
Choosing URLs: Include one preview URL per layout (Home, Collection, Product, Cart, Pricing, Blog, Form). 8–12 URLs usually cover 95%+ of shared templates.