Skip to content

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

Closed
felladrin wants to merge 1 commit into
mainfrom
fix/accessibility-landmarks-and-live-region
Closed

fix(a11y): add screen-reader landmarks and live region for streaming responses#2210
felladrin wants to merge 1 commit into
mainfrom
fix/accessibility-landmarks-and-live-region

Conversation

@felladrin

Copy link
Copy Markdown
Owner

Root Cause

Issue #2186: The streaming AI answer body had no aria-live region, so assistive-tech users heard nothing as tokens arrived. Separately, the main page lacked a <main> landmark and <h1>, giving no document outline or skip target for screen-reader navigation.

What Changed

File Change
client/components/Pages/Main/MainPage.tsx Wrap content in <main> landmark; add visually-hidden <h1> with value proposition
client/components/AiResponse/AiResponseContent.tsx Pass aria-live="polite" and aria-busy to FormattedMarkdown
client/components/AiResponse/FormattedMarkdown.tsx Accept and forward aria-live / aria-busy props to the Typography wrapper
client/components/AiResponse/FormattedMarkdown.test.tsx New — tests for aria attribute forwarding
client/components/Pages/Main/MainPage.test.tsx Added tests for <main> landmark and hidden <h1>

How Verified

  • All 275 existing tests pass (full suite)
  • 2 new tests for landmarks on MainPage
  • 2 new tests for aria attribute forwarding on FormattedMarkdown
  • knip ran clean (auto-fixed 2 unused imports)

…responses

- Wrap MainPage content in <main> landmark for document outline
- Add visually-hidden <h1> with value proposition for AT users
- Add aria-live="polite" and aria-busy to streaming AI response
- Forward aria attributes through FormattedMarkdown to Typography wrapper
- Add tests for new landmarks and aria attribute forwarding
@felladrin

Copy link
Copy Markdown
Owner Author

Closing in favor of #2211, which takes the same fix with a more robust live-region placement (a stable always-mounted wrapper rather than threading aria props through the reusable FormattedMarkdown). The test coverage from this PR has been ported onto #2211.

@felladrin felladrin closed this Jul 23, 2026
@felladrin
felladrin deleted the fix/accessibility-landmarks-and-live-region branch July 23, 2026 20:51
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