Repository navigation
feat(ui): let screen readers walk long chats without mounting them all - #890
Merged
Merged
Conversation
Screen-reader users reached history through a hidden "Show full conversation" toggle that mounted every message, so the slowest render path in the app was reserved for them and for the longest chats. The transcript is now a WAI-ARIA feed: each row is a focusable article with its position in the branch, PageUp/PageDown move focus between articles, and Ctrl+Home/End leave the feed. The virtualizer keeps whichever row holds focus mounted, so assistive technology walks the whole branch while only the window around it renders. Each message opens with a visually hidden heading naming its author, level 5 for the user and 6 for the agent's reply. NVDA leaves article names unspoken by default, so without it a listener cannot tell who wrote what; the headings also give heading navigation a stop at every message. They are unselectable so copied text stays unchanged. Focus no longer retains a row for the rest of the visit. Readers that move focus through links and buttons as they read would otherwise re-mount the whole chat; clicks, typing and selections, which change row state, still retain it. Checked with NVDA 2026.2 and Edge on a 300-turn chat: line reading and heading navigation cross the rendered window in both directions. In browse mode NVDA keeps PageUp/PageDown for itself, so the feed keys serve keyboard users and focus mode. Assisted-by: claude-opus-5.5
Contributor
[Medium impact] The change affects screen-reader navigation in chat transcripts across the app. The PR appears safe to merge, with a non-blocking request for a browser regression test. Findings
Fix with agent prompt### Issue 1
ui/tests/transcriptVirtualization.test.mjs:90-103
The new navigation tests call extracted handlers with fake elements, but never run the focus effect or a real focus/blur sequence. They would still pass if `PageDown` mounted the next row but failed to focus or scroll to it. Add a browser test that crosses an unmounted boundary in both directions, checks `document.activeElement`, and confirms that previously focused rows are released.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThe PR replaces the full-conversation toggle with a virtualized message feed.
Reviews (1) · Last reviewed commit: "feat(ui): read the transcript as an ARIA..." · Reviewed by Greptile |
Assisted-by: claude-opus-5.5
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Screen-reader users could only reach chat history through a hidden "Show full conversation" toggle that mounted every message, the slowest render path in the app on exactly the longest chats. The transcript is now a WAI-ARIA feed that keeps only the window around focus mounted, and each message opens with a hidden author heading (level 5 for you, level 6 for the agent), because NVDA does not announce article names by default.
Proved with NVDA 2026.2 and Edge in a Windows VM on a 300-turn chat (line reading and heading navigation cross the rendered window in both directions), a headless Chrome walk that never mounts more than 13 rows, and
pnpm typecheck,lint:i18n,lint:styles,test.Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved
Assisted-by: claude-opus-5.5