Package Exports
- axle-cloudflare-plugin
- axle-cloudflare-plugin/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (axle-cloudflare-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
axle-cloudflare-plugin
Scan your Cloudflare Pages preview URL for WCAG 2.1 / 2.2 AA violations on every deploy.
Install
Add to your Cloudflare Pages build step:
npx axle-cloudflare-pluginOr add to your package.json:
{
"scripts": {
"postbuild": "axle-cloudflare-plugin"
}
}Configuration (env vars)
| Variable | Default | Notes |
|---|---|---|
AXLE_FAIL_ON |
serious |
critical / serious / moderate / minor / none |
AXLE_WITH_AI_FIXES |
"false" |
Set to "true" + ANTHROPIC_API_KEY to include Claude-generated diffs |
AXLE_MAX_AI_FIXES |
10 |
Cost guard |
AXLE_URL |
$CF_PAGES_URL |
Override the target URL |
Set these in Cloudflare Pages → Settings → Environment Variables.
What it does
- Reads the preview URL from
CF_PAGES_URL(Cloudflare sets this during builds). - Invokes
axle-clito scan against axe-core 4.11 + Claude Sonnet 4.6. - Writes a JSON + markdown report next to your publish dir.
- Prints the first ~4kB of the report into build logs.
- Exits non-zero when violations meet/exceed
AXLE_FAIL_ON.
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