You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Screen reader announcements like "Settled 1 thread, Ctrl+Z to undo" stay in the page after they no longer apply #31667
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Turn on a screen reader (NVDA, JAWS, or VoiceOver).
Settle (or snooze, archive, unpin) a thread from the sidebar. You hear "Settled 1 thread, Ctrl+Z to undo".
Wait more than 5 seconds, so the undo notice expires and disappears from the sidebar.
In browse mode / virtual cursor, go to the end of the page (NVDA: Ctrl+End, then arrow up).
Expected behavior
Once a message has been spoken, it is gone from the page. In particular, nothing says "Ctrl+Z to undo" after undo has stopped working.
Actual behavior
The last announcement, "Settled 1 thread, Ctrl+Z to undo", is still there to read. It stays until something else is announced, even though the visible notice is gone and Ctrl+Z no longer undoes anything.
It isn't limited to the undo notice. Every message that goes through announce() stays in the page the same way, for example the model picker, "Opening in…", and background thread announcements. The undo notice is the worst case, because the leftover text says an action is available when it isn't.
Cause. In apps/web/src/lib/announce.ts, flush() writes the message into one of two visually hidden aria-live regions and never empties it. The regions are kept in document.body. cancelAnnouncement() only drops messages that haven't been spoken yet, so when the undo notice expires (showThreadUndoNotice.ts, 5 second expiry at L141-L149), the spoken text stays. The visible notice in SidebarThreadUndoNotice.tsx is set to aria-hidden and inert when it expires, so it looks intended that the message can't be reached after that. Only the live region copy is left behind.
The text probably stays because flush() uses first.textContent to decide which region to write to next, which is how the same message can be spoken twice in a row. Clearing the region a moment after writing it (and tracking the next region separately) would keep that behavior.
Impact
Minor bug or occasional failure
Version or commit
T3 Code (Nightly) desktop 0.1.8-nightly.20261105.4218; code links are at main @ 8b44f42
Environment
Windows 11 Pro 10.0.26200, NVDA 2026.3, T3 Code desktop app (the code is shared with web, so the web app is affected too)
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
None. The old message is only replaced when something else is announced.
Activity