Skip to main content

Overview and Pre-requisites

A11yInspect can be integrated with GitHub Actions to perform automated accessibility testing as part of your development workflow. Once configured, accessibility checks can run automatically when code is pushed to a repository, when a pull request is created or updated, or whenever a workflow is manually triggered.

The GitHub integration helps teams:

  • Detect accessibility issues before deployment
  • Review findings directly within GitHub
  • Generate accessibility reports as part of CI/CD
  • Enforce accessibility quality gates for pull requests
  • Maintain compliance with WCAG requirements throughout development

Accessibility Check lifecycle​

There is multiple stages of accessibility check lifecycle as:

Stage 1: Trigger

Workflow starts on push, PR, manual run, or scheduled execution.

EventWhenWhy it’s useful
push to mainSomeone pushes or merges into mainKeeps the main branch’s results and GitHub Issues current
pull_request to mainA PR is opened, or new commits are pushed to itCatches problems before they are merged. This is the most important trigger
workflow_dispatchSomeone clicks Run workflow in the Actions tabLet's you run a check on demand, which is useful for testing the setup
schedule (optional)At a fixed time, such as every MondayFull audits and trend tracking (see Optional extras)

Stage 2: Setup

GitHub runner installs Node.js, dependencies, and the A11yInspect CLI. GitHub starts a fresh Linux runner and prepares it:

  • Checkout: downloads your repository’s code onto the runner.
  • Install Node.js: A11yInspect is a Node.js program. The workflow also tells npm that packages named @barrierbreak/... come from GitHub Packages.
  • Install A11yInspect: downloads the @barrierbreak/a11yinspect package. This is where BB_NPM_TOKEN is used. It is a read-only download token. It can install this one package and nothing else.
  • Install your project’s dependencies (React/JSX/TSX projects only): runs npm ci so React components can be checked accurately. It is skipped automatically if your repo has no package-lock.json.

Stage 3: Check

Source files are scanned against BarrierBreak accessibility rules. The A11yInspect CLI now does the actual work:

  • License validation: the CLI sends A11YINSPECT_LICENSE_KEY to the BarrierBreak API and confirms it is a valid Enterprise license. If not, it stops with a clear error message.
  • File discovery: it finds every file that matches the patterns you set (for example src/**/*.{html,jsx,tsx} ) and skips the excluded folders (node_modules , dist , build ).
  • Accessibility checks: each file is checked against BarrierBreak’s WCAG ruleset.
  • Results: every issue comes with its WCAG success criterion, conformance level (A / AA / AAA), a plain-language explanation, and the exact file, line and column.

Stage 4: Report

Findings are published to PRs, Issues, Security Scanning, and artifacts. The results are delivered in several places at once, so each user can use the one that suits them:

WhereWhat you seeWho it’s for
Pull request to Files changedRed inline notes on the exact lines with FailsThe developer who made the change
Issues tabGitHub Issues listing each Fail, labelled accessibility and a11yInspect. They are updated on each run, not duplicated.Team leads, sprint planning
Security to code scanningEvery finding, filterable and trackable over timeSecurity / quality owners
Run Summary to Artifactsfixa11y-reports.zip containing the HTML report and the SARIF fileAnyone, including people outside engineering

Stage 5: Decide

Workflow passes or fails based on detected accessibility violations. The CLI finishes with an exit code, and GitHub uses that to mark the run:

ResultExit CodeWhat GitHub ShowsEffect on PR
No Fail-level Issues0Green tickCan be merged
One or more fails found1Red CrossBlocked from merging
Setup problem (bad key, install failure)1Red CrossBlocked. Read the log (see Troubleshooting).

The developer can read the annotations or report, fixes the code, and pushes again. That push triggers the cycle again until the check is green.

Pre-requisites​

Before configuring A11yInspect for GitHub Actions, ensure you have the following:

  • Administrator access to the target GitHub repository
  • Permission to manage GitHub Actions workflows
  • Access to repository secrets and settings

Required Credentials​

Obtain the following credentials from BarrierBreak Team:

CredentialsPurpose
A11YINSPECT_LICENSE_KEYAuthenticates your A11yInspect enterprise subscription
BB_NPM_TOKENAllows installation of A11yInspect packages