Skip to content

fix(a11y): add screen-reader landmarks and live region for streaming responses - #2211

Merged
felladrin merged 3 commits into
mainfrom
fix/2186-a11y-screen-reader-landmarks
Jul 23, 2026
Merged

fix(a11y): add screen-reader landmarks and live region for streaming responses#2211
felladrin merged 3 commits into
mainfrom
fix/2186-a11y-screen-reader-landmarks

Conversation

@felladrin

Copy link
Copy Markdown
Owner

Root Cause

The streaming AI response was rendered into a plain Card/Text with no aria-live region, so assistive-tech users heard nothing as tokens arrived. Separately, the main page had no <main> landmark and no <h1>, so there was no document outline or skip target for keyboard/screen-reader navigation.

What Changed

File Change
client/components/Pages/Main/MainPage.tsx Added VisuallyHidden <h1> for document outline; wrapped main content in <main> landmark via Stack component="main"
client/components/AiResponse/AiResponseContent.tsx Wrapped streaming response body in <Box aria-live="polite" aria-busy={isGenerating}> so screen readers announce tokens as they arrive

How Verified

  • All 7 existing MainPage tests pass
  • tsc --noEmit — zero errors
  • No new dependencies added

Fixes #2186

…responses

- Add VisuallyHidden <h1> to MainPage for document outline
- Wrap main content in <main> landmark via Stack component prop
- Wrap streaming response in aria-live='polite' aria-busy region
- Fixes #2186
In useReasoningContent, isGenerating is true only in the branch that also
returns an empty mainContent, so {!isGenerating && mainContent} and
{mainContent} are equivalent. Removing the redundant term; no behavior
change.
@felladrin
felladrin force-pushed the fix/2186-a11y-screen-reader-landmarks branch from a510be0 to ab5d0fa Compare July 23, 2026 21:14
@felladrin
felladrin marked this pull request as ready for review July 23, 2026 21:14
@felladrin
felladrin merged commit ad91a12 into main Jul 23, 2026
7 checks passed
@felladrin
felladrin deleted the fix/2186-a11y-screen-reader-landmarks branch July 23, 2026 21:18
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.

Streaming answer isn't announced to screen readers; page lacks landmarks

1 participant