axle-vercel-plugin
v1.0.2
Published
Vercel a11y / WCAG 2.2 AA accessibility build step — scan your deploy preview for accessibility violations on every build, fail the deploy on regressions. Works with Next.js, Astro, Remix, SvelteKit. Built for EAA 2025, ADA, Section 508.
Maintainers
Readme
axle-vercel-plugin
Run the axle accessibility scanner against every Vercel deploy preview. Fails the build when WCAG 2.1 / 2.2 AA violations cross your threshold.
Install
Set your Vercel project's Build Command (Project Settings → General → Build & Development Settings):
next build && npx -y axle-vercel-pluginOr add it as a postbuild hook in package.json:
{
"scripts": {
"postbuild": "axle-vercel-plugin"
}
}Configuration (env vars)
Set these in Vercel → Project Settings → Environment Variables.
| Variable | Default | Notes |
|----------|---------|-------|
| AXLE_FAIL_ON | serious | critical / serious / moderate / minor / none |
| AXLE_WITH_AI_FIXES | "false" | Set to "true" + ANTHROPIC_API_KEY for Claude-generated diffs |
| AXLE_MAX_AI_FIXES | 10 | Cost guard on AI calls per build |
| AXLE_URL | $VERCEL_BRANCH_URL / $VERCEL_URL | Override the target URL |
| ANTHROPIC_API_KEY | — | Required only if AXLE_WITH_AI_FIXES=true |
What it does
- Waits for your build to finish.
- Reads
VERCEL_BRANCH_URL(preferred) orVERCEL_URL— Vercel sets these automatically. - Invokes
axle-cli scanagainst the preview URL. - Writes
axle-report.json+axle-report.mdinto the project root so they're viewable in the deployment. - Prints the first ~4kB of the markdown report into build logs.
- Exits non-zero when violations meet or exceed
AXLE_FAIL_ON— this fails the deployment.
Not a compliance certificate
Remediation assistance only. Automated tools catch ~57% of WCAG issues — manual human review is still recommended.
Learn more: axle-iota.vercel.app · GitHub
