Repository navigation
feat(accessibility): choose a scan's WCAG version, best practices and needs review - #513
Conversation
… needs review "Scan bstackdemo.com on WCAG 2.2 AAA with best practices on" ran at the API's defaults (WCAG 2.1 AA, best practices off), as startAccessibilityScan could only set advanced rules. The create-scan API takes all four under scanSettings, so the tool now does too: wcagVersion (the API's ten values, wcag2a to wcag22aaa and rgaa41), bestPractices and needsReview, alongside advancedRules. A setting left out still takes the API's default, and the answer says what the scan ran with, marking the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Review: #513 The schema change is additive, so existing callers are unaffected. CI shows only CodeQL and CodeRabbit (auto-review skipped), so the test counts in the description aren't CI-verified. Medium
Low-Medium
Low
AI-assisted read-only review of the diff. Items marked (unverified) were not checked against the live APIs. |
…own reason Review on #513: - The success note read "(default)" for every setting not asked for, from a table in this code. It now reads the run's settings back from its summary ("as the scan ran"), which also shows advanced rules a plan turned off. When the summary cannot be read it names only what was asked for. - A 422 was always reported as "a scan with this name already exists". The API's own reason is now passed on; the name message is kept for a 422 that gives none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @sarve-shreyas. Both addressed in 79cc46d:
|
|
This has been merged into #502 (c7e454d), which now ships it to |
Brings in #502 (Automate links, share links, large exports, one-page view, scan-run comparison, #510's device note, #513's scan settings, #492's Ask AI pointer). Conflicts resolved by keeping both sides: - fetchAccessibilityIssues resolves the source first, then compareWith goes to the scan-run comparison for a scan and to the app-build comparison for an app build; pageUrl and exportTaskId pass through for web reports, and the next-page hint keeps the pageUrl with the exact remaining count. - Report links: a share link is unwrapped first, then app and manual-report links, then Automate links. - The CSV parser pages through the shared pageOf/sortBySeverity; its local copy is dropped. - The run-started message carries both the device note and the accessibility guidance. - The ids handoff keeps main's Ask AI pointer within the 200-character budget; the app lists' searchCapability pointer moves to the buildId and appReportId argument descriptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Asked to "scan bstackdemo.com on WCAG 2.2 AAA with best practices on", the agent couldn't.
startAccessibilityScanonly exposedadvancedRules, so every scan ran at the API's defaults: WCAG 2.1 AA, best practices off, needs review on.Change
startAccessibilityScantakes three new optional arguments, passed to the Website Scanner create-scan API underscanSettingsnext toadvancedRules:wcagVersionwcag2a…wcag22aaa,rgaa41(the backend'sWCAG_VERSION_LABEL_MAP)wcag21aabestPracticesneedsReviewadvancedRules(existing)Scan settings, as the scan ran: WCAG 2.2 AAA, best practices on, needs review on, advanced rules off.The agent can then report the settings instead of guessing them. If the run's settings can't be read, the line names only what was asked for.disableA11yEngineExperimentalRules) that only the dashboard can change. That needs a backend change first.Verification
tests/tools/accessibilityScanSettings.test.ts:wcagVersionaccepts only the API's valuesnpm run buildpasses on Node 22: 1358 tests.startAccessibilityScanon bstackdemo.com withwcagVersion: "wcag22aaa"andbestPractices: true. The API's run summary showswcagVersion: "wcag22aaa",bestPractices: true,needsReview: true,advanced: true. That's 91 issues, against 81 at the defaults.Changes after review (Shreyas)
mainmerged in.npm run buildpasses: 1360 tests.🤖 Generated with Claude Code