Skip to content

🔊 fix: Announce a Side Chat's Replies to Screen Readers - #18467

Draft
danny-avila wants to merge 1 commit into
danny-avila/side-chat-read-statefrom
danny-avila/side-chat-announcements
Draft

danny-avila wants to merge 1 commit into
danny-avila/side-chat-read-statefrom
danny-avila/side-chat-announcements

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

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 Chat and 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: start when a turn is named, composing at most once every seven seconds while steps arrive, end and 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

useFollowChat  (Chat.onEvent, after each frame is applied)
  created                    -> beside.announce({ message: 'start', isStatus: true })
  step, > 7 s since the last -> beside.announce({ message: 'composing', isStatus: true })
  final (not an early abort) -> beside.announce({ message: 'end', isStatus: true })
                                beside.announce({ message: getAllContentText(responseMessage) })
  step effect 'announce'     -> beside.announce({ message, isStatus: true })   # summarization

appSideChatHost.useChat
  beside.announce = useLiveAnnouncer().announcePolite

MESSAGE_UPDATE_INTERVAL and getAllContentText are the ones main chat's handlers use.

Type of change

  • Bug fix

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:

  • Chromium via Playwright, mock e2e lane (in-memory MongoDB, fake model), desktop 1440×900.

Automated tests:

  • packages/chat: npx jest (247 suites, 4011 tests), tsc --noEmit. New case in react/__tests__/follow.spec.tsx: start, no second announcement soon after, composing once the interval has passed and only once, then end and the reply's text.
  • client: new case in src/Providers/__tests__/SideChatHostContext.spec.tsx (the announcements reach the app's announcer); Presentation.test.tsx passes.
  • New scenario @scenario:side-chat-reply-is-announced in e2e/specs/mock/scenarios/side-chat-open-beside.spec.ts; all six scenarios in that file pass.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Head: 52b530a

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T03:11:40.918132Z 00e0c59 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 52b530a923

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danny-avila
danny-avila force-pushed the danny-avila/side-chat-read-state branch from 8ecca74 to 47ea7ed Compare November 19, 2026 03:10
@danny-avila
danny-avila force-pushed the danny-avila/side-chat-announcements branch from 52b530a to 00e0c59 Compare November 19, 2026 03:10
@danny-avila

Copy link
Copy Markdown
Collaborator Author

Rebased onto current dev (which now has #18480 in the same files); no change in behaviour.

@codex review

Head: 00e0c59

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 00e0c59b55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

This branch has not been deployed

No deployments
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.

1 participant