t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Screen readers read a background-work title and its timer as one word ("round 15m 11s")

Open nibarAhmed opened this issue 1 week ago • 2 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. With NVDA running, have an agent wait on a background task whose label ends in a number. For example, have it delegate_task a subagent titled "neon-loop review round 1" and wait on it.
  2. In the parent thread, read the "Waiting" line at the end of the timeline in NVDA browse mode.

Expected behavior

NVDA reads the title and the elapsed timer as separate words:

Waiting · neon-loop review round 1 5m 11s

Actual behavior

NVDA runs the title into the timer, so the round number and the minutes merge:

Waiting · neon-loop review round 15m 11s

On screen there is a visible gap, but the text has no separator. In ThreadNowLine (apps/web/src/components/chat/ThreadNow.tsx), the title/description span and the actions span (timer, Details, Stop) are sibling flex items with no text between them. This line renders background work (backgroundWorkNowItem) and the approval-request timer in ThreadActivityBanners.tsx, so both are affected.

Notes for a fix:

  • A plain {" "} between the two flex items probably won't help. A whitespace-only text node between flex items gets no layout box, so Chromium likely drops it from the accessibility tree. A trailing space inside the nowrap title span may collapse for the same reason.
  • DOM-level checks (textContent, getByText, jest-dom toHaveAccessibleName) will pass with or without the bug. A regression test should read Chromium's real accessibility tree, for example via CDP Accessibility.getFullAXTree in a browser test.
  • ComposerBannerStack.tsx builds title, description and actions the same way, as flex siblings with nothing between them, and may have the same problem. It hasn't been checked with a screen reader.

Impact

Minor bug or occasional failure

Version or commit

main @ f7d6796019

Environment

Windows 11, NVDA, Chromium-based client

nibarAhmed avatar Nov 25 '26 12:11 nibarAhmed

I tried to reproduce this on the current build and could not.

Commit 0f9bb6e0e7 (origin/main). I added a Chromium browser test in apps/web/src/components/chat/BackgroundWorkDetails.browser.test.tsx. It renders the real for one awaited background task titled 'neon-loop review round 1', with a running turn item started 5m 11s before a fixed system time. It then reads the screen-reader text from Chromium's real accessibility tree over CDP (Accessibility.getFullAXTree, the StaticText nodes in order, the same helper StyledDiffCodeView.browser.test.tsx uses). On screen the timer shows '5m 11s' after a gap, but the accessibility tree gives "Waiting · neon-loop review round 15m 11sDetailsStop": the title runs straight into the timer. Run with: cd apps/web && vp test run src/components/chat/BackgroundWorkDetails.browser.test.tsx -t "separate words". It fails on main. I did not run the full app with a live delegate_task subagent, because the free Replay provider cannot create background tasks, and I did not test NVDA itself (Windows only). That is why reproduced is false, even though the accessibility tree Chromium gives screen readers shows the defect with the production components.

Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

juliusmarminge avatar Nov 25 '26 12:11 juliusmarminge

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of @nibarAhmed

This still reproduces in NVDA, and your accessibility-tree test already shows the cause, so please reopen.

Your test reads Waiting · neon-loop review round 15m 11sDetailsStop from Chromium's accessibility tree on main. That string is what NVDA receives. It's also what I hear: NVDA reads the line as "…round 15m 11s".

Version

  • T3 Code (Nightly) desktop app 0.1.12-nightly.20261125.5230
  • NVDA 2026.3.1
  • Windows 11 Pro

Steps

  1. In the desktop app, have an agent start a subagent with delegate_task titled "neon-loop review round 1" and wait on it. The thread then shows the "Waiting" line at the end of the timeline.
  2. Read that line with NVDA in browse mode.

Expected: "Waiting · neon-loop review round 1 5m 11s", then the Details and Stop buttons. Actual: "Waiting · neon-loop review round 15m 11s". The round number runs into the minutes.

Your test could land as the regression test for the fix, since it fails on main for the right reason.

nibarAhmed avatar Nov 25 '26 12:11 nibarAhmed