Repository navigation
feat(accessibility): experimental rules; Automate accessibility setup; failed pages in scan compares - #519
Merged
Conversation
startAccessibilityScan takes experimentalRules, sent to the create-scan API as scanSettings.experimentalRules (browserstack/accessibility#5649, now deployed). Left out, the API's default (on) applies; false is sent as a setting, not dropped. The settings line reports experimental rules as the scan has them. The run summary does not carry them, so they are read from the scan's own settings (its overview), which a scan started here has for this run alone; when that cannot be read, the rest of the line still comes from the run summary. 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
|
… that did not load is not "fixed" From the QA evals (ATA-1461, ATA-1465): - setupBrowserStackAutomateTests takes accessibility. When it is on, the browserstack.yml step writes accessibility: true, and a last step says how to read the issues. The step now says to add to an existing file and keep its settings, rather than to update it with this content. - Comparing two scan runs: a page that did not load in the newer run is scanned anyway, as an error page under its address (BrowserStack's Local connection page, or Chrome's network error page), so its real issues read as resolved and the error page's as new. Issues on such a page are now set apart: the earlier ones as "not checked", the error page's left out, with a warning naming the page. A page whose earlier issues all gave way to new ones gets a softer warning. Neither the scan's logs nor the dashboard flag either case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed in the earlier run, Cypress/WebdriverIO accessibility
- compareIssues groups both runs' issues by page once and decides page by
page. The "changed page" check re-filtered the whole earlier run for each
resolved issue, parsing a URL each time: 3,000 issues per run took 3.3 s
and blocked the process; it now takes about 10 ms.
- A page that did not load in the earlier run is set apart too: the error
page's issues are not resolved, and the page's issues now are listed as not
checked against the earlier run rather than new. A page that failed in both
runs is not compared. Issues on a page that failed in either run are no
longer counted as still open.
- The error-page pattern no longer matches a link to the Local docs or a
class merely starting with neterror: a real page can have either. The Local
connection page is still caught by its ref=dashboard-privoxy-page links, and
Chrome's by id="main-frame-error", class="neterror" or chrome-error://.
- The warnings agree in number ("1 page ... its place ... the 1 issue ...
is"), and the earlier-run case has its own.
- setupBrowserStackAutomateTests with accessibility: true now covers Cypress
("accessibility": true under run_settings in browserstack.json) and
WebdriverIO (accessibility: true in the browserstack service's options),
which return before the browserstack.yml step, and says how to read the
issues. Both flags checked in browserstack-cypress-cli 1.37.1 and
@wdio/browserstack-service 9.41.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SavioBS629
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
startAccessibilityScancould set the WCAG version, best practices, needs review and advanced rules, but not experimental rules. The public create-scan API had no field for them. browserstack/accessibility#5649 addedscanSettings.experimentalRules, and it is now deployed.What
experimentalRulesargument (true / false) onstartAccessibilityScan, sent asscanSettings.experimentalRules. When it's left out, the API's default (on) applies.falseis sent as a real setting, not dropped as missing.Scan settings, as the scan ran: WCAG 2.2 AAA, best practices on, needs review on, advanced rules on, experimental rules off.The run summary that the other settings come from has no experimental field. So this one is read from the scan's own settings (/scans/{id}/overview,scanConfigInfo.experimental), which a scan started here has for this run alone. Both reads go out in parallel. If the overview can't be read, the rest of the line still comes from the run summary.docs/TOOLS.mdlists the scan settings, and says whataccessibility: truedoes onsetupBrowserStackAutomateTests.The argument description is within the 120-character budget, and the tool's description is unchanged.
Verified
npm run buildpasses on Node 22: lint, prettier, 1564 tests, tsc. New tests cover:falseis sentLive, against the deployed API:
experimentalRules: "yes"is refused with a 422 (scanSettings.experimentalRules field must be a valid Boolean), and no scan is created.experimentalRules: falseshowsexperimental: falsein its overview.startAccessibilityScanthrough this branch's build on bstackdemo.com, withexperimentalRules: false,wcagVersion: "wcag22aaa"andbestPractices: true, completed in about a minute. Its answer read:Scan settings, as the scan ran: WCAG 2.2 AAA, best practices on, needs review on, advanced rules on, experimental rules off.Every scan setting, both ways. Two more scans of bstackdemo.com went through this branch's build, each with every setting set explicitly. Each answer read back exactly what was asked:
WCAG 2.0 A, best practices off, needs review off, advanced rules off, experimental rules on.WCAG 2.2 AAA, best practices on, needs review on, advanced rules on, experimental rules off.In the reports:
bestPracticeson (8 against 0).wcag22aaa.bypass-blocks-skip-linksappears only with advanced rules on.wcag2arun still reportscolor-contrast(SC 1.4.3, a level AA criterion). The scan ran atwcag2aby its own summary, so this is the scan engine's rule selection, not something this change sends.Also in this PR (QA eval bugs)
ATA-1461: the Automate setup now writes
accessibility: true.setupBrowserStackAutomateTestshad no accessibility option. Asked for accessibility testing, it returned abrowserstack.ymlwithout it and said to replace the existing file.accessibility(off by default).accessibility: truesection, and a last step says how to read the issues:fetchAccessibilityIssueswith the Automate build link or the SDK's build id.browserstack.ymland keep its other settings, instead of "update it with the following content".ATA-1465: a page that didn't load in a re-run no longer reads as fixed. A page that fails to load is still scanned, as an error page filed under its address. Its real issues then read as resolved and the error page's as new. The scan's own logs say "success" for that page, and the dashboard counts it the same way.
ref=dashboard-privoxy-page) and Chrome's network error page (id="main-frame-error",class="neterror",chrome-error://).Verified live on QA's case, scan 4263536, where page B didn't load in run 2382506. The dashboard says 2 new, 6 resolved, 2 still open. The comparison now gives 0 new, 0 resolved, 2 still open, with page B's 6 issues listed as not checked and the warning. With the two runs swapped (the earlier-run case), it gives 0 new, 0 resolved, 2 still open, with the 6 issues listed as not checked against the earlier run.
setupBrowserStackAutomateTestswithaccessibility: truewas checked through the built server.Changes after review
neterror, no longer marks a page as not loaded, since a real page can have either. QA's privoxy page is still caught by itsref=dashboard-privoxy-pagelinks.browserstack.ymlstep, soaccessibility: truewas dropped silently. Cypress now gets"accessibility": trueunderrun_settingsinbrowserstack.json, WebdriverIO getsaccessibility: truein the BrowserStack service's options, and both get the step on reading the issues. Both flags were checked in browserstack-cypress-cli 1.37.1 and @wdio/browserstack-service 9.41.0.Build: lint, prettier, 1581 tests, tsc.
Note for review
#517 also changes
scanner.ts: it routesrunSettings's request through a timedget. Whichever lands second needs a small merge inrunSettings, where both reads should go through thatget.🤖 Generated with Claude Code