Skip to content

Support native mouse tracking in Chromium 142+ (UIA enabled by default) #19276

Description

@lucascastrorp

Description
Starting with Chromium 142 (currently in VS Code Insiders), the UiaProvider feature is enabled by default. This enables native mouse tracking via UIA, fixing long-standing issues with Electron apps where mouse tracking was silent or required external add-ons.

However, NVDA does not currently opt-in to UIA for these windows by default. The current heuristic in UIAHandler specifically blocks UIA for the Chrome_RenderWidgetHostHWND window class unless the user manually forces the setting "Use UIA with Microsoft Edge..." to "Yes".

Steps to Reproduce:

  1. Open an Electron app running Chromium 142+ (e.g., VS Code Insiders 1.107.0).
  2. Ensure NVDA setting "Use UIA with Microsoft Edge..." is set to "Default" (which resolves to "Only when necessary").
  3. Move the mouse over the editor code or UI elements.

Actual Behavior:
NVDA remains silent. It appears to fall back to the legacy IA2 path. Since Chromium 142 now prioritizes UiaProvider, the legacy path seems disconnected or incomplete for mouse hit-testing in this context.

Expected Behavior:
NVDA should detect that UIA is available and preferred for this Chromium version (or specifically when UiaProvider is active), and use it for object retrieval.

Technical Information:
The issue was analyzed by the VS Code team in issue microsoft/vscode#277895.
The root cause is located in source/UIAHandler/__init__.py, where Chrome_RenderWidgetHostHWND is treated as non-UIA by default:

elif windowClass == "Chrome_RenderWidgetHostHWND":
# Unless explicitly allowed, all Chromium implementations (including Edge) should not be UIA,
# As their IA2 implementation is still better at the moment.
# However, in cases where Chromium is running under another logon session,
# the IAccessible2 implementation is unavailable.
# 'brchrome' is part of HP SureClick, a chromium-based browser which runs webpages to run in separate
# virtual machines - it supports UIA remoting but not IAccessible2 remoting.
hasAccessToIA2 = (
not appModule.isRunningUnderDifferentLogonSession and not appModule.appName == "brchrome"
)
if (
AllowUiaInChromium.getConfig() == AllowUiaInChromium.NO
# Disabling is only useful if we can inject in-process (and use our older code)
or (
canUseOlderInProcessApproach
and hasAccessToIA2
and AllowUiaInChromium.getConfig()
!= AllowUiaInChromium.YES # Users can prefer to use UIA
)
):
if isDebug:
log.debug("_isUIAWindowHelper:Chromium window treated as non-UIA")

Specifically, the logic returns False for UIA usage unless AllowUiaInChromium.getConfig() == AllowUiaInChromium.YES.

System Info:
NVDA: 2025.3.1
App: VS Code Insiders (Chromium 142.0.7444.162)
OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions