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 && (
<ChatBubble
role="assistant"
content={streaming.content}
metricSource={streaming.metricSource}
providerType={streaming.inProgress ? "streaming" : null}
inProgress={streaming.inProgress}
errorCode={streaming.errorCode}
/>
// role=log + aria-live=polite so screen-reader users hear the
// assistant prose announce as tokens land. aria-relevant=text
// limits announcements to the streamed content; additions
// covers the bubble-mount edge case.
<div role="log" aria-live="polite" aria-relevant="additions text">
<ChatBubble
role="assistant"
content={streaming.content}
metricSource={streaming.metricSource}
providerType={streaming.inProgress ? "streaming" : null}
inProgress={streaming.inProgress}
errorCode={streaming.errorCode}
/>
</div>
)}
</div>
);