Skip to content

feat(ui): let screen readers walk long chats without mounting them all - #890

Merged
small-angel merged 2 commits into
mainfrom
clo/transcript-aria-feed
Nov 4, 2026
Merged

small-angel merged 2 commits into
mainfrom
clo/transcript-aria-feed

Conversation

@small-angel

Copy link
Copy Markdown
Contributor

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

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
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P2 Focus handoffs remain untested ▶
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.

Summary

The PR replaces the full-conversation toggle with a virtualized message feed.

  • Screen readers can walk chat history without mounting every message.

Reviews (1) · Last reviewed commit: "feat(ui): read the transcript as an ARIA..." · Reviewed by Greptile

Assisted-by: claude-opus-5.5
@small-angel
small-angel merged commit 2c52e25 into main Nov 4, 2026
9 checks passed
@small-angel
small-angel deleted the clo/transcript-aria-feed branch November 4, 2026 20:47
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