Skip to content

Stop screen readers announcing "connecting" when Web Chat starts - #6016

Merged
Eugene (OEvgeny) merged 6 commits into
mainfrom
OEvgeny/fix-toaster-announces-hidden
Nov 5, 2026
Merged

Eugene (OEvgeny) merged 6 commits into
mainfrom
OEvgeny/fix-toaster-announces-hidden

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

When Web Chat starts, screen readers hear the raw, untranslated word "connecting" (or "connected") from the toaster, for a connectivity notification the toaster never shows.

Changelog Entry

Fixed

  • Fixed screen readers announcing "connecting" when Web Chat starts, in PR #6016, by @OEvgeny

Description

The toaster queued every notification to the live region, including the connectivity status notification, which only the connectivity status bar shows and which is deliberately silent while Web Chat starts (#5946). The toaster now announces only the notifications that its toast middleware renders, expanded or collapsed.

Design

  • Announce what renders, instead of skipping the connectivitystatus id a second time: a host whose toastMiddleware shows that notification as a toast still gets it announced, and one it hides (returns false) is no longer announced.
  • Not the toaster's own role="log" instead of the queued copy: that changes how every toast is announced, a separate change.

Specific Changes

  • BasicToaster.js: loop over sortedNotificationsWithChildren (rendered toasts) instead of every notification
  • toast/liveRegion.renderedOnly.html: snapshot 1, the live region (bottom) has only the toast text, no "connecting"
  • 22 tests that read the live region or ariaNotify() calls no longer expect the leading "connecting" or "connected"; the 63 snapshots that show the live region lose that one line and nothing else
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 3 commits November 4, 2026 00:34
The toaster announced every notification it had not announced yet,
including the connectivity status notification, which it never renders.
At start-up, screen readers heard the raw word "connecting".

Loop over the rendered notifications instead, and add
toast/liveRegion.renderedOnly.html.
Tests that read or show the live region expected the connectivity
status notification ("connecting" or "connected") first. Remove it
from 22 tests' expectations and regenerate the 63 snapshots that show
the live region; nothing else changed in them.
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review November 4, 2026 19:25
Copilot AI balanced review requested due to automatic review settings November 4, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Eugene Olonov added 2 commits November 4, 2026 23:21
…nnecting'

activityStatus.longSend.echoBack.html and activityStatus.longSend.sharedKey.html (added in #6013) expected the toaster's 'connecting' first. Drop it; sharedKey's live region is now empty. Regenerate both snapshots: only the 'connecting' line is gone.
@OEvgeny

Copy link
Copy Markdown
Collaborator Author

Merged main and updated the 2 live region tests that #6013 added, because they expected the "connecting" announcement this PR removes:

  • activityStatus.longSend.echoBack.html now expects only "Sending message."
  • activityStatus.longSend.sharedKey.html now expects an empty live region

Their 2 snapshots changed only in the live region. Nothing else changed since your approval; without this, merging would turn main red.

@OEvgeny
Eugene (OEvgeny) merged commit a2d0be5 into main Nov 5, 2026
46 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-toaster-announces-hidden branch November 5, 2026 18:23
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