Repository navigation
A11Y-13878 (v9): Scan iPhone Safari without the binary; clearer a11y-off messaging - #354
palspal-bstack wants to merge 5 commits into
Conversation
…essaging
- Run a11y scripts with executeAsync on mobile in the in-process flow; iOS Safari doesn't await a Promise from execute/sync, so scans, results and save returned {}.
- Turn accessibility off at build start when every capability is an unsupported mobile platform, so no empty report is created.
- Warn once that advanced rules don't run on mobile browsers.
- Warn when accessibility was requested but the binary's build start didn't start it.
- Add no-op a11y commands in the CLI flow when accessibility isn't running, so tests calling them don't throw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Leave App Automate runs to App Accessibility's own platform checks. - Check multiremote and parallel-multiremote capabilities too. - Add the no-op a11y commands whenever the CLI flow runs, not only when the worker's options say accessibility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tack:options.device Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
RUN_TESTS |
|
✅ Good to go
Change map (generated deterministically from the diff)graph LR
subgraph nwdio_browserstack_service["wdio-browserstack-service"]
npackages_browserstack_service_src_launcher_ts["⚠ launcher.ts<br/>~50 lines"]
npackages_browserstack_service_src_util_ts["⚠ util.ts<br/>~50 lines"]
npackages_browserstack_service_tests_launcher_test_ts["⚠ launcher.test.ts<br/>~50 lines"]
npackages_browserstack_service_tests_util_test_ts["⚠ util.test.ts<br/>~50 lines"]
n_changeset_pr_354_md["pr-354.md<br/>~7 lines"]
npackages_browserstack_service_src_cli_index_ts["index.ts<br/>~7 lines"]
npackages_browserstack_service_src_service_ts["service.ts<br/>~7 lines"]
npackages_browserstack_service_tests_cli_frameworks_index_test_ts["index.test.ts<br/>~7 lines"]
end
↻ This verdict comment is the review anchor — it's updated in place on each run (the gate posts its status separately). — SDK PR Review Agent |
Pre-merge checks:
|
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
1 similar comment
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
|
[SDK Wdio Test] TRA build state: failed | Stability 90% — verdict: failure. Passed: 52, Failed: 6, Aggregate: 58. TRA: https://observability.browserstack.com/builds/mchijtqhx9asvz22vwjbbsp16bmpub0sugaow0j5 |
|
RUN_TESTS |
|
[SDK Wdio Test] TRA build state: failed | Stability 91% — verdict: failure. Passed: 53, Failed: 5, Aggregate: 58. TRA: https://observability.browserstack.com/builds/4ogbvtjttpd3uwfncth67g55lbev8uh9adorls4s |
What is this about?
v9 port of #352 (
main). Same four commits cherry-picked ontov9; the code diff is identical to #352's. Replaces #353, which targetedv9from #352's branch.Follow-up to #311 (mobile web accessibility), from the product review of Safari on iPhone.
browser.executewrapped in a Promise. iOS Safari doesn't await it, so they all returned{}, with no scans, no report and no warning. A11Y-13878: Scan Chrome on Android and Safari on iPhone for accessibility #311 passed the mobile args and set the script timeout on this path, but not the executor.executeAccessibilityScriptnow usesexecuteAsyncon mobile sessions, as the CLI flow does. Desktop is unchanged.alwaysMatch, parallel-multiremote and multiremote capabilities are all checked. App Automate runs are skipped (App Accessibility has its own platform rules). Mixed and desktop runs are unchanged.includeIssueType.advanced: truewith a mobile capability: warns once that advanced rules don't run on mobile browsers (scans already skip them).log/sdk-cli.log.getAccessibilityResultsSummary/getAccessibilityResults/performScan/startA11yScanning/stopA11yScanningonly when the build started accessibility, so a test calling one threwis not a function. Whenever the CLI flow runs, any of them still missing is now added as a no-op ({},[],undefined); the classic flow already always adds them. Commands the accessibility module added are left alone.Not in this PR: the v8 branch, and
main(#352).Tested on prod (WDIO 9.32.0, packed build of #352's branch, same code as this PR, bstackdemo.com, one session at a time)
"No binary" = mocha with the CLI framework list emptied locally, so it takes the in-process flow. Counts are summary with no start /
performScan()/ summary after start-stop, withautoScanning: false.{}/{}/{}{}/{}/{}The first desktop count varies between 5 and 55 on both versions: the sample calls the summary straight after a click, while the page is changing.
{}; no a11y build (a11y builds API 404)advanced: true, binaryChrome on Android, binary on / off (Galaxy S25 / Android 15,
autoScanning: false; same three counts as above):No change on Android; the first count is the same click-then-summary race. Chrome on Android already awaited the Promise from
execute, so theexecuteAsyncswitch only changes iOS Safari.Mixed-platform builds (mocha, default options, sessions in parallel within each build). Summary per session is tagged / excluded test; platforms are from the a11y builds API's
osData/browserData:undefined{}All 13 sessions pass. One unsupported device doesn't turn accessibility off for the rest of the build. The
undefinedvs{}for an unsupported session is frommain(the CLI module returns early whenthis.accessibilityis false); not changed here.Before the no-op commands, the iPhone 15 binary run failed with
browser.getAccessibilityResultsSummary is not a function; that is what added the last bullet above.Unit tests: new coverage for
executeAsyncon mobile vsexecuteon desktop, the requested-platform helper, the launcher's unsupported-only (array and multiremote), App Automate and advanced checks, the build-start warning and the no-op commands; one existing test updated to expectexecuteAsyncon iPhone.vitestonutil,launcher,serviceandcli/frameworks/indextests: the same 62 failures asmain(network-backed tests), no new ones.tsc --noEmitand ESLint clean.Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
Release notes (internal): (required — engineer-facing; what actually changed / why)
executeAccessibilityScriptusesexecuteAsyncon mobile sessions (iOS Safari doesn't await a Promise from execute/sync).includeIssueType.advancedwith a supported mobile capability.startBinSessiondidn't return it.Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.
🤖 Generated with Claude Code