Equall

CI

Fail a pull request only on violations the change introduces. Flags, exit codes, the GitHub Action with pull request comments, and CI snippets for GitHub Actions, GitLab CI, and Azure Pipelines.

equall scan . --diff [base] --fail-on <severity>

Compares the change against its base and reports only what the change introduced. Existing debt ("legacy" findings) never fails the check. Identity is a fingerprint, not the line number, so a reformat doesn't read as new.

Nothing leaves your runner: the scan is static, runs on the checked-out code, no account, no token, nothing uploaded.

This is a static check of the source. It never replaces a check of the rendered page — the terminal output says so too: "The rendered page still needs its own check."

Flags

FlagDescriptionDefault
--diff [base]Git ref to compare against, e.g. origin/main. With no value, read from the CI environment: CI_MERGE_REQUEST_DIFF_BASE_SHA (GitLab), then GITHUB_BASE_REF (GitHub Actions), CI_MERGE_REQUEST_TARGET_BRANCH_NAME (GitLab), SYSTEM_PULLREQUEST_TARGETBRANCH (Azure Pipelines) — a branch resolves to origin/<branch>(off)
--fail-on <severity>Exit 1 when the change introduces a violation at this severity or above: critical, serious, moderate, minor(off — report only)
--working-treeCompare the base against the files on disk, not the last commit. Needs --diff(off)

--fail-on only works with --diff. --diff can't be combined with --min-score. Without --fail-on, --diff only reports and always exits 0.

equall scan <dir> --diff limits the diff to <dir>. Paths stay relative to the repository root.

With --diff, --level sets the target level (default AA), --json prints the diff result, and --json-out <file> writes it to a file while keeping the terminal output, the annotations, the job summary and the exit code. The full-scan options --include, --exclude, --standard and --no-readability are not used: the diff scans every changed .html, .htm, .jsx, .tsx, .vue, .svelte and .astro file, minus the files a full scan skips by default.

Start with --fail-on critical; switch to serious to be stricter.

Working tree

equall scan . --diff origin/main --working-tree --fail-on serious

The base is compared with the files on disk, so uncommitted work can be checked before it's committed. Modified and staged files are read from disk; untracked files count as added (files .gitignore excludes are skipped); deleted files are ignored. Binary files, and markup files with binary content, are listed under not_testable. The JSON result adds "working_tree": true; --fail-on, --json, --json-out and the exit codes are unchanged.

git commit records the index, not the files on disk. Pre-commit flow: check, then git add, then commit.

Exit codes

These apply to --diff. A full scan (without --diff) follows the exit codes on Scanning.

ExitMeaning
0No new violation at the threshold, or --diff used without --fail-on (report only)
1The change introduced a violation at --fail-on or above
2The check couldn't run: invalid --fail-on value, --fail-on or --working-tree without --diff, --min-score with --diff, no base detected, base ref not fetched, a shallow clone, or a --json-out file that cannot be written

What blocks the merge

  • New WCAG violations at or above --fail-on.

What's reported but never blocks

  • New violations below the threshold — a warning.
  • New review-only findings — static analysis can't confirm them, flagged "to review".
  • New advisory findings — best-practice recommendations, or above the target conformance level.
  • Legacy findings already present in the changed files at the base.
  • Changed files that can't be statically tested (CSS, scripts, config) — the count is named in the output.
  • Changed files a scanner couldn't analyze — listed as "not checked", since their findings are unknown.
  • Files a full scan also skips (tests, stories, build output).

--json prints the diff result as JSON: new_issues, new_review_only, new_advisory, legacy_issues, not_testable, unchecked, excluded, summary.

When a change adds a copy of a violation that already existed in the file, the copy on the added line is the one reported as new, not the unchanged original. If the new copy can't be tied to an added line, it is reported without a line.

GitHub annotations

On GitHub Actions, the check writes annotations on the pull request: errors for new violations at the threshold, warnings below it, notices for review-only and advisory findings, warnings for files not checked. axe-core findings carry a line when it can be determined in the source; findings without a line are annotated at file level and appear in the check summary instead of inline.

GitHub caps annotations at 10 errors and 10 warnings per step. The job summary and the terminal output list everything.

--json alone prints the diff result instead and turns the annotations off. To keep them and still get the JSON, use --json-out <file>.

History and shallow clones

The comparison needs the base branch and the history it shares with the change. Without it, the check exits 2 with a message naming what to fetch.

  • GitHub Actions — actions/checkout with fetch-depth: 0.
  • GitLab CI — GIT_DEPTH: 0. The base is the merge-base commit GitLab computes (CI_MERGE_REQUEST_DIFF_BASE_SHA).
  • Azure Pipelines — checkout: self with fetchDepth: 0.

GitHub Action

GotaBird/equall-action runs the same diff check on GitHub Actions, with the annotations and the job summary above. Outside a pull request (for example on push) it runs a report-only scan and never fails.

.github/workflows/a11y.yml
name: Accessibility
on: pull_request

jobs:
  equall:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - uses: GotaBird/equall-action@v1
InputDefaultDescription
fail-oncriticalFail when the change introduces a violation at this severity or above
path.Path to scan, relative to the repository root
basethe pull request target branchGit ref to compare against
levelAAWCAG conformance target: A, AA or AAA
versionlatest 0.3.xequall-cli version range to run. Pin version: 0.3.5 to keep the previous version
report-to, project-keyemptyAlso report each check to your project on Equall. Empty: nothing leaves the runner
commentfalseComment on the pull request with the issues it introduces. Needs pull-requests: write

The Action uses the same exit codes as --diff: 0, 1, 2.

Pull request comments

With comment: true, the Action also comments on the pull request, and only about what it introduces. A pull request that introduces nothing gets no comment.

.github/workflows/a11y.yml
name: Accessibility
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

concurrency:
  group: equall-pr-${{ github.event.pull_request.number }}
  cancel-in-progress: true

permissions:
  contents: read
  pull-requests: write

jobs:
  equall:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0
      - uses: GotaBird/equall-action@v1
        with:
          comment: true

Check out the pull request head (ref: ${{ github.event.pull_request.head.sha }}): the default merge commit's line numbers don't always match the pull request's diff. When the scanned commit is not the head, the Action posts no inline comment and lists every new issue in the summary.

  • Inline comments — one per changed line with new violations (counted WCAG violations within level), when the line is in the diff. Each violation says what is wrong, who it affects and how to fix it, and is commented once: re-running or pushing again doesn't repeat it.
  • File-level comments — new violations without a line get one comment per changed file, showing each element so you can find it.
  • At most 10 new comments per run, lines and files together; the rest are listed in the summary.
  • Summary comment — one comment, posted when the pull request introduces at least one new violation and updated in place afterwards. It lists the new violations without their own comment and the changed files that couldn't be tested or analyzed. Existing violations, findings to review and best-practice recommendations are only counted. It is never deleted: once nothing new is found, it says so.
  • Lifecycle — an issue is followed by its fingerprint, not its line. When its violations are no longer found, a comment says so and its thread is resolved, or hidden if the token can't resolve threads, or deleted; a comment someone answered is never deleted. A comment GitHub marks outdated whose violation is still found is posted again where the violation now is. A thread resolved by hand stays resolved.
  • Events — this example's check and comment run on opened, synchronize, reopened and ready_for_review only, never outside a pull request. The "Report to Equall" workflow below adds edited, which re-runs the check after the base branch changes, and closed, which runs no new check and posts no comment — it only reports the pull request's close/merge event to Equall. Pull requests from forks and Dependabot get a read-only token: the Action logs a notice and posts nothing.
  • Never changes the verdict — the comment step runs after the check, even when it fails. A commenting error is only logged.
PermissionNeeded?What it gives
pull-requests: writeRequiredPost, update, hide and delete the Action's own comments. Without it, the Action logs a warning and posts nothing
contents: writeOptional, not recommendedLets the token resolve review threads instead of hiding the comments. It also lets any step of the job push to the repository; keep contents: read

The summary comment carries the result for tools and agents in a hidden HTML comment, <!-- equall:data {"schema":"equall.pr-check/v1", ...} -->: the repository, pull request number, scanned commit (head_sha), engine_version, counts (new, fixed, legacy, review_only, not_testable), up to 50 new_issues (fingerprint, file, line, rule, wcag, severity) and truncated. It never contains source code, HTML snippets or messages. The full reference is in the Action's README.

Report to Equall

report-to and project-key additionally report each check to your project on Equall — id-token: write is required so the Action can mint the OIDC token report-to authenticates with. report-to is Equall's ingest endpoint, the same for every repository; project-key identifies yours, together with this repository's GitHub Actions OIDC token. Get both from get_ci_setup over MCP, or the dashboard's "Set up CI" steps. project-key is a repository variable named EQUALL_PROJECT_KEY (Settings → Secrets and variables → Actions → Variables), not a secret. Omit both inputs and nothing leaves the runner.

.github/workflows/equall.yml
name: Accessibility
on:
  pull_request:
    types: [opened, synchronize, reopened, edited, closed]

concurrency:
  group: equall-pr-${{ github.event.pull_request.number }}
  cancel-in-progress: true

permissions:
  contents: read
  id-token: write
  pull-requests: write

jobs:
  equall:
    name: Equall accessibility
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0
      - uses: GotaBird/equall-action@v1
        with:
          report-to: <your Equall ingest URL>
          project-key: ${{ vars.EQUALL_PROJECT_KEY }}
          comment: 'true'

<your Equall ingest URL> is a placeholder, not a literal value to paste: replace it with Equall's ingest endpoint, read from get_ci_setup's ingest_url field, or copy the ready-made workflow from the dashboard's "Set up CI" steps.

CI snippets

GitHub Actions

Trigger on pull_request, not pull_request_target — the latter checks out the base branch, so the diff is empty.

.github/workflows/a11y.yml
on: pull_request

jobs:
  a11y:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npx equall-cli@^0.4.0 scan . --diff --fail-on critical

Or use the ready-made GitHub Action above.

GitLab CI

.gitlab-ci.yml
a11y:
  image: node:22
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  variables:
    GIT_DEPTH: 0
  script:
    - npx equall-cli@^0.4.0 scan . --diff --fail-on critical

Azure Pipelines

azure-pipelines.yml
pr:
  - main

pool:
  vmImage: ubuntu-latest

steps:
  - checkout: self
    fetchDepth: 0
  - task: NodeTool@0
    inputs:
      versionSpec: '22.x'
  - script: npx equall-cli@^0.4.0 scan . --diff --fail-on critical

Generic shell / any CI

git fetch origin main
npx equall-cli@^0.4.0 scan . --diff origin/main --fail-on critical

Use the exit code to gate the build.

On this page