Docs
Accessibility testing in CI: send your own test results, and add a check
How do I add accessibility testing to CI?
Run axe-core, Playwright with @axe-core/playwright, or Lighthouse in your pipeline, then send the JSON results to https://jralo.com/api/v1/results with a site token. Jralo adds them to your site's dated, tamper-evident evidence log and answers whether the run passes, so the build can fail on critical or serious problems. This is on paid plans.
On paid plans, results from your own accessibility tests can go into your site's Jralo evidence log, with the same dated, tamper-evident record as Jralo's ongoing monitoring. The same call answers whether the run passes, so your pipeline can fail when it finds critical problems.
1. Create a token
In your dashboard, open the site, choose Send your own test results and add a CI check, then Create a token. Copy it once and save it as a secret named JRALO_TOKEN in your CI. Jralo stores only a hash of it.
2. Send results
POST https://jralo.com/api/v1/results with Authorization: Bearer JRALO_TOKEN and a JSON body:
tool:"axe"(axe-core results),"playwright"(what@axe-core/playwrightreturns) or"lighthouse"(a Lighthouse JSON report).results: that tool's JSON output.fail_on(optional):"critical"(default),"serious"(critical or serious) or"none".commit,branch,source(optional): recorded with the entry.
Imported results join your evidence record. Use the response to apply the build policy you selected.
The answer includes pass, the counts by impact and the evidence log entry number. Up to 60 calls an hour per token.
GitHub Actions with Lighthouse
name: Accessibility
on: [push, pull_request]
jobs:
jralo:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with: { node-version: 22 }
- name: Lighthouse accessibility audit
run: |
npx --yes lighthouse@12 "$SITE_URL" --only-categories=accessibility \
--output=json --output-path=report.json --chrome-flags="--headless=new --no-sandbox" --quiet
env:
SITE_URL: https://your-site.com/
- name: Send to Jralo and fail on critical problems
run: |
jq -n --slurpfile r report.json \
'{tool: "lighthouse", results: $r[0], fail_on: "critical", commit: env.GITHUB_SHA, branch: env.GITHUB_REF_NAME, source: "github-actions"}' \
| curl -sS --fail-with-body -X POST https://jralo.com/api/v1/results \
-H "Authorization: Bearer $JRALO_TOKEN" -H "content-type: application/json" --data @- \
| tee jralo.json
jq -e '.pass' jralo.json > /dev/null
env:
JRALO_TOKEN: ${{ secrets.JRALO_TOKEN }}Playwright with axe-core
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('home page', async ({ page }) => {
await page.goto('https://your-site.com/');
const results = await new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa', 'wcag22aa']).analyze();
const res = await fetch('https://jralo.com/api/v1/results', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.JRALO_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({ tool: 'playwright', results, fail_on: 'critical', commit: process.env.GITHUB_SHA }),
});
const answer = await res.json();
expect(answer.pass, `${answer.byImpact?.critical ?? '?'} critical problems`).toBe(true);
});Questions
- How do I add accessibility testing to GitHub Actions?
- Run Lighthouse, or Playwright with @axe-core/playwright, in a workflow step, then send the JSON report to https://jralo.com/api/v1/results with your site token saved as the secret JRALO_TOKEN. The answer's pass field tells the job whether to fail. A complete workflow is on this page.
- Can a build fail on accessibility problems?
- Yes. Set fail_on to "critical" (the default), "serious" (critical or serious) or "none". Jralo counts the problems by impact and answers pass: false when the run has problems at that level, so your job can stop with an error.
- Which accessibility test tools does Jralo accept?
- Jralo accepts axe-core, Playwright and Lighthouse JSON results. See the CI setup guide for the supported request format and plan requirements.
- Do I need a paid plan to send results?
- Yes. Sending your own results is part of paid plans. Each token allows up to 60 calls an hour, and Jralo stores only a hash of the token.
- Does a passing CI check mean my site is accessible or compliant?
- No. Automated testing finds many, not all, accessibility problems. A passing check is not a statement that a site meets any law or standard. Pair it with keyboard and screen reader testing.
Related: Website Mechanic fixes what a check finds as a GitHub pull request, and how to check a website by hand in 15 minutes.