a11y(coach): announce streaming assistant text to screen readers

The streaming assistant bubble updated in place as the SSE tokens
landed but had no aria-live region — sighted users saw live text
while screen-reader users heard silence. Wrap the in-flight bubble
in role=log + aria-live=polite + aria-relevant=additions text so the
assistant prose announces progressively (matches the daily-briefing
pattern that already uses aria-live for its loading state).

Fixes Design-HIGH-3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-10 18:04:39 +02:00
1 parent 3c353fe012
commit 8479e05a20
1 file changed
+14 -8
@@ -115,14 +115,20 @@ export function MessageThread({
/> />
))} ))}
{streamingActive && streaming && ( {streamingActive && streaming && (
<ChatBubble // role=log + aria-live=polite so screen-reader users hear the
role="assistant" // assistant prose announce as tokens land. aria-relevant=text
content={streaming.content} // limits announcements to the streamed content; additions
metricSource={streaming.metricSource} // covers the bubble-mount edge case.
providerType={streaming.inProgress ? "streaming" : null} <div role="log" aria-live="polite" aria-relevant="additions text">
inProgress={streaming.inProgress} <ChatBubble
errorCode={streaming.errorCode} role="assistant"
/> content={streaming.content}
metricSource={streaming.metricSource}
providerType={streaming.inProgress ? "streaming" : null}
inProgress={streaming.inProgress}
errorCode={streaming.errorCode}
/>
</div>
)} )}
</div> </div>
); );