Add axle-netlify-plugin (accessibility compliance CI)#1481
Add axle-netlify-plugin (accessibility compliance CI)#1481asafamos wants to merge 1 commit intonetlify:mainfrom
Conversation
👷 Deploy request for netlify-plugins pending review.Visit the deploys page to approve it
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request updates Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
site/plugins.json (2)
106-106: Unrelated character-encoding changes should be reverted or split out.These modifications re-encode existing emoji/typographic characters (⚡️, ’, 🔌, ☑️, “”, 🐺) as
\uXXXXJSON escape sequences. They are semantically identical to what was there before but appear on lines unrelated to the Axle plugin addition — likely an artifact of the editor/serializer used locally. This adds noise to the diff, makes the file harder to review, and mixes unrelated churn into an otherwise targeted PR.Please revert these lines so the PR only contains the new
Axle Accessibilityentry, or move the re-encoding into a separate PR if it's intentional.Also applies to: 294-294, 320-320, 329-329, 600-600, 726-726, 984-984
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@site/plugins.json` at line 106, Revert the unrelated JSON re-encoding changes in plugins.json by restoring the original emoji/typographic characters (e.g., ⚡️, ’, 🔌, ☑️, “”, 🐺) instead of their \uXXXX escape sequences so the PR only contains the Axle Accessibility addition; alternatively, move all these encoding-only edits into a separate commit/PR. Locate the affected entries by searching for the altered description strings such as "Persist the Gridsome cache between Netlify builds for huge speed improvements!" and any other plugin descriptions that now contain \uXXXX sequences, replace those escape sequences with the original glyphs, and ensure the Axle Accessibility entry remains the only functional change in this PR.
1046-1059: Consider adding adocslink to help users discover configuration inputs.The npm package
axle-netlify-plugin@1.0.1is properly published with all required metadata fields (repository,bugs,homepage, andnetlify/netlify-pluginkeywords). The repo athttps://github.com/asafamos/axleis publicly accessible.Adding a
docsfield pointing to the plugin README would help users discover setup instructions for thefailOn,withAiFixes,maxAiFixes, andurlinputs, which won't be visible fromplugins.jsonalone.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@site/plugins.json` around lines 1046 - 1059, Add a "docs" field to the Axle Accessibility plugin object (the entry with "name": "Axle Accessibility" and "package": "axle-netlify-plugin") that points to the plugin README or docs URL (e.g. the GitHub README at https://github.com/asafamos/axle#readme) so users can discover configuration inputs like failOn, withAiFixes, maxAiFixes, and url; update the JSON object to include "docs": "<URL>" alongside the existing metadata fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@site/plugins.json`:
- Line 106: Revert the unrelated JSON re-encoding changes in plugins.json by
restoring the original emoji/typographic characters (e.g., ⚡️, ’, 🔌, ☑️, “”,
🐺) instead of their \uXXXX escape sequences so the PR only contains the Axle
Accessibility addition; alternatively, move all these encoding-only edits into a
separate commit/PR. Locate the affected entries by searching for the altered
description strings such as "Persist the Gridsome cache between Netlify builds
for huge speed improvements!" and any other plugin descriptions that now contain
\uXXXX sequences, replace those escape sequences with the original glyphs, and
ensure the Axle Accessibility entry remains the only functional change in this
PR.
- Around line 1046-1059: Add a "docs" field to the Axle Accessibility plugin
object (the entry with "name": "Axle Accessibility" and "package":
"axle-netlify-plugin") that points to the plugin README or docs URL (e.g. the
GitHub README at https://github.com/asafamos/axle#readme) so users can discover
configuration inputs like failOn, withAiFixes, maxAiFixes, and url; update the
JSON object to include "docs": "<URL>" alongside the existing metadata fields.
Adds axle-netlify-plugin to
site/plugins.json.What it does
Scans every Netlify deploy preview for WCAG 2.1 / 2.2 AA accessibility violations using axe-core 4.11. When enabled, Claude Sonnet generates source-code fix diffs per violation for inclusion in the build log. Fails the build when violations meet or exceed a configurable severity threshold — so accessibility regressions can't ship.
Why this plugin
DEPLOY_PRIME_URL; every input has a sensible default.Checklist (per plugin review guidelines)
DEPLOY_PRIME_URL)manifest.ymlpresent,namematches the npm package namerepository,bugs,homepagenetlifyandnetlify-pluginaxle-netlify-plugin)onPostBuild, returnsfailBuild()appropriatelyonPostBuild(all scanning happens in-phase)nameand adescriptionInputs
failOn— severity threshold (critical/serious/moderate/minor/none). Default:serious.withAiFixes— generate AI fix suggestions (requiresANTHROPIC_API_KEYenv var). Default:false.maxAiFixes— cost guard on AI calls per build. Default:10.url— override the scan URL. Defaults toDEPLOY_PRIME_URL.Environment variables (optional)
ANTHROPIC_API_KEY— only required whenwithAiFixesis true. Claude generates the fix diffs.Happy to adjust description length, entry placement, or any metadata if the current format needs changes.