Repository navigation
🔊 fix: Announce a Side Chat's Replies to Screen Readers - #18467
danny-avila wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
8ecca74 to
47ea7ed
Compare
52b530a to
00e0c59
Compare
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
A turn in a side chat says nothing to a screen reader. In main chat a reader who cannot see the screen hears that a reply has started, hears every few seconds that it is still being written, and at the end hears that it is done and what it says. A reply in a conversation opened beside the chat (#18417) arrives in silence: nothing reaches the page's live region.
Main chat makes those announcements from its stream session's handlers, through the app's announcer. A side chat runs on a
Chatand never enters those handlers.With this change the followed chat makes the same announcements at the same points and hands them to its host, and the app's side chat host passes them to the announcer main chat uses, so they are worded and localized identically:
startwhen a turn is named,composingat most once every seven seconds while steps arrive,endand the reply's text on the final frame, plus the summarization notices the step reducer already reports. A turn stopped before the server kept anything of it announces no end.Stacked on #18466. Related to #18417.
How it works
MESSAGE_UPDATE_INTERVALandgetAllContentTextare the ones main chat's handlers use.Type of change
Testing
In a real browser on the mock e2e lane: after a reply lands in a side chat, the page's polite live region holds the reply's text. Before the change the region stayed empty for a side chat turn.
Each new test was run with the change switched off and fails there.
Tested environments/configuration:
Automated tests:
packages/chat:npx jest(247 suites, 4011 tests),tsc --noEmit. New case inreact/__tests__/follow.spec.tsx: start, no second announcement soon after,composingonce the interval has passed and only once, thenendand the reply's text.client: new case insrc/Providers/__tests__/SideChatHostContext.spec.tsx(the announcements reach the app's announcer);Presentation.test.tsxpasses.@scenario:side-chat-reply-is-announcedine2e/specs/mock/scenarios/side-chat-open-beside.spec.ts; all six scenarios in that file pass.