Skip to content

fix(accessibility): land #541 and #553 on main - #566

Merged
gaurav-singh-9227 merged 5 commits into
mainfrom
fix/a11y-land-541-553
Nov 11, 2026
Merged

gaurav-singh-9227 merged 5 commits into
mainfrom
fix/a11y-land-541-553

Conversation

@Aaryan430

@Aaryan430 Aaryan430 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why

#541 and #553 were approved and merged, but neither reached main.

They were merged as a stack: #553 into #541's branch, #541 into #527's branch (fix/a11y-report-links), and #527 into main. On 6 Nov, #527 was squash-merged into main at 13:48:37 UTC, and #541 was merged into #527's branch 13 seconds later, at 13:48:50. So main has #527 only, and the #541 and #553 changes sit on fix/a11y-report-links.

On main today, for example:

  • startAccessibilityScan has no scanId re-run and no localIdentifier;
  • fetchAccessibilityIssues can't compare scan runs (compareWith works for app builds only);
  • the apiClient connect retry is missing.

What changed

One git cherry-pick -x of cb12556 onto main. cb12556 is #541's squash commit on fix/a11y-report-links, and it already contains #553. Nothing else is changed.

Every accessibility source and test file, src/lib/apiClient.ts and its test are byte-identical to fix/a11y-report-links. For what each change does and how it was tested, see #541 and #553.

Testing

🤖 Generated with Claude Code

* fix(accessibility): hand back scans that outlast the wait, scan through the user's own Local tunnel, rename on a taken name, say why plan rules are off

- startAccessibilityScan returns a scan that outlasts the 5-minute wait as still running,
  with its scan id, run id and dashboard link, instead of "Failed to start accessibility
  scan" with no ids. A cancelled run ends the wait, and the wait's timer is cleared.
- startAccessibilityScan takes an optional localIdentifier: the scan goes through a
  BrowserStack Local tunnel the user started, and no tunnel is started or killed. The
  hosted refusal of local URLs says how to start one.
- A scan name already in use is retried once with a UTC timestamp appended, and the
  result opens with the name used.
- When advanced or experimental rules were not asked off but the run reports them off,
  the settings line says the plan most likely doesn't include them.
- apiClient gives each of a host's addresses 2 s to connect instead of Node's 250 ms, and
  tries a request once more when its connection never opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(accessibility): clean scan names the API would refuse, and say why a scan failed

- startAccessibilityScan replaces characters central-scanner refuses in a scan name ("/",
  "|", "&", ",", ")" and more, and "--") instead of failing the scan. Accents are dropped,
  parentheses become square brackets, and a name with nothing usable left falls back to
  the page's host. The result says the name was changed and what it was started as.
- A failed scan now says why: the run's own reason from the scans list, and each page that
  did not scan with its reason from the run's scan logs, up to 10 pages. Without either, it
  still points to the dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(api-client): retry a connect failure only when it failed fast

A failure after every address has timed out means the host is down. Retrying
it doubled the wait, which loops over many calls (scan-list walks, polling)
would pay on every call. Only a failure within 5 s is tried again now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cb12556)
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: e93a29d8-cd9d-46b2-87b4-4c12bde54ae8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

… to BrowserStack AI

- fetchAccessibilityIssues (first page) and startAccessibilityScan now give the
  report's accessibility score as the dashboard shows it: the share of points
  each severity lost, the passed/failed checks per severity, and how the score
  is worked out (a check is one rule on one page; critical 10, serious 7,
  moderate 3, minor 1; a failed check counts double).
- Read from the report's own summary for Website Scanner runs, Automated Tests
  builds and Workflow Analyzer reports. A scanner run read by its build id is
  found in the scan list first. App builds and reports have no score here.
- The same results tell the agent to call askBrowserStackAI (product a11y) for
  anything about the report beyond listing its issues, such as a plan or what
  to fix first, instead of working out a plan itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aaryan430 and others added 2 commits November 11, 2026 18:42
The connect retry sent the same body again. A file upload's form-data is a
stream that the first try reads even when the connection never opens, so the
retry sent what was left of it and then waited for the rest. The uploads set
no timeout, so they hung instead of failing.

A stream body is now never retried: the connect failure is reported straight
away, as before the retry was added. Other requests keep the retry.

Affects every tool that uploads through apiClient: the App Live and App
Automate app uploads and the Test Management file upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es only

For a Website Scanner link, the score finds the scan's ids by walking the
scan list, up to 25 pages at ~1.2 s a page. The list has only each scan's
latest run, so a link to an earlier run is never found: the walk ran in full
on every first page, after the export's wait of up to 45 s, and could push
the issue list past the client's 60 s timeout.

The score now searches the newest 2 pages, which still find a scan that was
just run. Reading issues and comparing runs keep the full 25-page walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SavioBS629
SavioBS629 previously approved these changes Nov 11, 2026
@gaurav-singh-9227
gaurav-singh-9227 merged commit ed7cad8 into main Nov 11, 2026
7 checks passed
Aaryan430 added a commit that referenced this pull request Nov 11, 2026
Resolves the conflicts with #566 and #568:
- accessibilityExpert answers start with the deprecation note, then main's
  "question was shortened" note when the question was cut, then the answer.
- docs/TOOLS.md keeps main's re-run wording for startAccessibilityScan and
  marks accessibilityExpert deprecated.
- accessibilityExpertQuery tests now expect the deprecation note first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants