Learn to scan web applications for WCAG 2.2 accessibility violations using axe-core, IBM Equal Access, and custom Playwright checks.
View the Project on GitHub devopsabcs-engineering/accessibility-scan-workshop
| Duration | 30 minutes |
| Level | Intermediate |
| Prerequisites | Lab 02, Lab 03, or Lab 04 (at least one) |
By the end of this lab, you will be able to:
You will generate accessibility scan results in the SARIF format used by GitHub Code Scanning.
Create a results directory if it does not exist:
mkdir -p results
Run the scanner with SARIF output:
npx ts-node src/cli/commands/scan.ts --url http://localhost:8001 --format sarif --output results/a11y-001.sarif
Verify the SARIF file was created:
ls -la results/a11y-001.sarif

You will walk through the SARIF v2.1.0 schema to understand how accessibility findings are represented.
Open results/a11y-001.sarif in your editor. The top-level structure is:
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [...]
}
Each run represents one scan execution and contains:
| Section | Description |
|---|---|
tool |
The scanner tool identity and version |
tool.driver.rules |
Array of rule definitions with IDs, descriptions, and help URLs |
results |
Array of individual findings |
results[].ruleId |
Which rule was violated |
results[].level |
Severity: error, warning, or note |
results[].message |
Human-readable description of the finding |
results[].locations |
Where the violation occurs (URI and region) |

Review how severity levels map from axe-core impact to SARIF:
| axe-core Impact | SARIF Level |
|---|---|
| critical | error |
| serious | error |
| moderate | warning |
| minor | note |
Examine a single result entry:
{
"ruleId": "image-alt",
"level": "error",
"message": {
"text": "Images must have alternate text"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "http://localhost:8001"
}
}
}
]
}
You will upload the SARIF file to your fork’s Security tab using the GitHub CodeQL action.
Create a workflow file at .github/workflows/upload-sarif.yml in your fork:
name: Upload SARIF
on:
workflow_dispatch:
inputs:
sarif_file:
description: 'Path to SARIF file'
required: true
default: 'results/a11y-001.sarif'
permissions:
security-events: write
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: $
category: accessibility-scan
Commit and push the workflow to your fork:
git add .github/workflows/upload-sarif.yml
git commit -m "feat: add SARIF upload workflow"
git push
Ensure the SARIF file is also committed:
git add results/a11y-001.sarif
git commit -m "feat: add sample SARIF scan results"
git push
Trigger the workflow:
gh workflow run upload-sarif.yml
Wait for the workflow to complete:
gh run watch
[!NOTE] The
github/codeql-action/upload-sarif@v4action requires thesecurity-events: writepermission. GitHub Advanced Security must be enabled on your repository (it is enabled by default on public repositories).
You will navigate the GitHub Security tab to view the uploaded accessibility alerts.
Open your fork on GitHub in a browser.
Navigate to the Security tab, then click Code scanning.

Click on an individual alert to view its full details, including the rule help text and WCAG criterion.

You will practice filtering and managing alerts in the Security tab.
Use the severity filter to show only error-level alerts (critical and serious violations):


[!TIP] In a real project, triage alerts as part of your team’s sprint review. Critical and serious violations should be addressed immediately, while moderate and minor issues can be tracked for future sprints.
Before proceeding, verify:
Proceed to Lab 06: GitHub Actions Pipelines and Scan Gates.