Repository navigation
Description
Note
🤖 Antigravity posting on behalf of nibarAhmed
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
Steps to reproduce
- On Windows with NVDA in browse mode, open T3 Code (web or desktop).
- Move the browse mode cursor onto the Thread details card and press
Shift+F10. NVDA recognizes the menu and puts focus into it. - Repeat with
Shift+F10from browse mode on other context menus backed byapi.contextMenu.show(...)(for example: thread header/title, sidebar rows, branch/workspace controls, file browser/diff entries, right-panel tabs).
Expected behavior
Pressing Shift+F10 in NVDA browse mode on any context menu should cause NVDA to recognize it as a menu and move focus into its items, matching the Thread Details menu (ThreadDetailsPanel.tsx).
Actual behavior
The Thread Details card opens an in-DOM Base UI <Menu> / <MenuPopup> (apps/web/src/components/chat/ThreadDetailsPanel.tsx) with default modal={true}, roving tabindex, background isolation, and unconditional focus into the menu. Almost every other context menu instead goes through api.contextMenu.show(...) (apps/web/src/localApi.ts), which fails to reliably move NVDA browse mode focus into the menu:
Web (showContextMenuFallback):
apps/web/src/localApi.tsdrops thesource("keyboard"|"mouse") argument before callingshowContextMenuFallback(items, position).apps/web/src/contextMenuFallback.tstries to infer keyboard opening viapreviouslyFocusedElement?.matches(":focus-visible"). In NVDA browse mode,Shift+F10from the virtual cursor commonly fails:focus-visible, so focus falls back to the<div role="menu" tabindex="-1">container while every<button role="menuitem">staystabindex="-1".- The fallback menu is non-modal: it appends a
<div>todocument.bodywithout hiding or inerting the rest of the page, and itsfocusinlistener immediately dismisses the menu if focus lands outside it.
Desktop (ElectronMenu.showContextMenu):
apps/desktop/src/electron/ElectronMenu.tsonly passessourceType: "keyboard"tomenu.popup(...)when callers supplysource(packages/contracts/src/ipc.ts); otherwise Electron assumes mouse input and does not pre-select the first item. Mostapi.contextMenu.show(...)call sites still omitsource(useThreadActionMenu,ChatHeader,BranchToolbar,BranchToolbarBranchSelector,RightPanelTabs,FileBrowserPanel,fileContextMenu,ThreadTerminalDrawer,MediaActions,pullRequestLinkContextMenu,ArchivedThreadsPanel).- In the sidebar,
apps/web/src/lib/sidebarTree.tsinterceptsShift+F10onkeydownand only dispatches the syntheticcontextmenuevent onkeyupifdocument.activeElement === row, which rejects browse-mode activations when DOM focus is not already on that row.
Related issues:
- Message link context menus do not receive focus with screen readers on Windows #10390 tracks message link context menu focus on Windows desktop (with fix(desktop): keyboard-opened message link menus select their first item #24889, fix(web): chat links open their menu from the keyboard on macOS #37405, and fix(web): keyboard-opened sidebar menus select their first item #37727 addressing links and sidebar source forwarding). This issue tracks the remaining gap across
api.contextMenu.show(...)menus on web (showContextMenuFallback) and desktop compared toThreadDetailsPanel's Base UI<Menu>.
Impact
Minor bug or occasional failure
Version or commit
main @ b5e1f91
Environment
Windows 11 Pro (10.0.26300), NVDA (browse mode)
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Tab directly onto the target control or switch NVDA into focus mode (NVDA+Space) before pressing Shift+F10.
Activity