[Bug]: Streamed browser tabs are invisible to screen readers #25271
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/web, apps/server, apps/mobile
Steps to reproduce#
- Open a preview tab that runs in the server browser on a client that can't render it natively: the web app (app.t3.codes or
npx t3), a remote environment from desktop, or mobile. - Turn on a screen reader (Narrator, NVDA, VoiceOver) and move into the browser panel.
Expected behavior#
The screen reader can read and move through the page in the tab, the way it can in a normal browser tab.
Actual behavior#
It finds one text field called "Browser page" and nothing else. ServerBrowserSurface.tsx paints the streamed JPEG frames onto a <canvas> with no role. The only accessible node is a hidden <textarea aria-label="Browser page"> that forwards keystrokes. A screen reader user on Windows reported this and asked whether the panel is "just a video". For their purposes, it is.
Impact#
Major degradation or frequent failure. Blind users can't use the built-in browser at all on these clients.
Version or commit#
main at f88b33a16d
Environment#
Reported on Windows. rendersServerTabNatively in apps/web/src/browser/previewRuntime.ts only renders natively in Electron on its primary environment. Every other client gets the canvas, including mobile, which runs the same stream in PreviewStreamWebView.tsx.
Proposed direction#
This needs a maintainer call on scope before anyone builds it.
Frames already go over their own socket (/api/preview-stream/ws, ServerBrowserStream.ts). The wire types live in packages/client-runtime/src/preview/serverBrowserStream.ts. The server screencasts per viewer with one JPEG in flight, plus small JSON messages for viewport, control and pointer.
One way to fix it is an opt-in accessibility message on that socket. The server enables the CDP Accessibility domain. On loadComplete it sends the non-ignored nodes with role, name, value, states, backendDOMNodeId, and bounds from DOM.getContentQuads. After that it sends diffs on nodesUpdated and on scroll, debounced and coalesced to the latest state like frames.
The client renders a transparent mirror of those nodes over the canvas. It places each node with the canvas's own fit math so the screen reader's focus box lands on the right spot. Focusing a mirrored node makes the server call DOM.focus. Activating one scrolls it into view and clicks its center. Read-only viewers can still read, and actions follow the existing control rules. Nothing goes over the wire unless a client asks for it, and hidden tabs already drop the stream.
Open questions#
- How does a client decide to ask? Electron and React Native can detect a screen reader. Plain browsers can't, so web may need a setting.
- Do VoiceOver and TalkBack handle a mirror inside the mobile WebView, or does mobile need native nodes?
- Cross-origin iframes are separate CDP targets, so each needs its own tree.
- Neither the cost on a large page nor whether
nodesUpdatedfires reliably in the bundled Chromium has been measured. - Should live regions be relayed as announcements?
- The agent snapshot tool uses Playwright's
ariaSnapshotwith boxes. It returns YAML and pauses viewers, so it looks like the wrong starting point.
Not checked: whether tabs Electron renders natively are accessible today.
Filed by Claude Opus 5.5 in Claude Code, for @SunkenInTime.
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
Sign in to join this conversation.
Note
🤖 Claude Opus 5.5 responding on behalf of nibarAhmed
The canvas also shows up in the desktop app on its primary environment, not only on web, remote environments and mobile. I found this by reading the code; I haven't confirmed it with a screen reader.
setUpTabinapps/server/src/preview/ServerBrowser.tsmarks a tab headless in two cases:DESKTOP_ATTACH_TIMEOUT(10 seconds). It also does this when no desktop channel is available.adoptedPages), for example awindow.openortarget="_blank"from a page.rendersServerTabNativelyreturns false for headless tabs, so the desktop app draws those tabs as the canvas too.markHeadlesskeeps the flag until the tab closes. A tab that is slow to attach once stays unreadable to screen readers for as long as it is open.This also answers the "Not checked" note. Tabs the desktop app renders natively are readable with NVDA in a wide window: browse-mode M reaches the page as a frame. In a window 980px wide or narrower, the right panel's modal sheet hid them; that is #45829.