Improve reliability in the Start Menu in Windows 11 24h2. (#18228)
Fixes #17951.
Summary of the issue:
NVDA misbehaves in several ways in the Start Menu in Windows 11 24h2, including freezes.
Description of user facing changes:
In the Start Menu in Windows 11 24h2:
NVDA no longer sometimes incorrectly switches to browse mode soon after entering the Start Menu.
NVDA no longer sometimes freezes when navigating in browse mode.
Search suggestions are now reported reliably.
Description of developer facing changes:
None.
Description of development approach:
In the searchui app module:
Calling SetFocus on UIA elements in the Edge WebView2 (Chromium) results document causes a freeze. Even though NVDA usually prefers IA2 for Chromium, it sometimes chooses UIA here; see the code comments for details. Therefore, explicitly ensure we never use UIA (i.e. always use IA2) for Start Menu Chromium objects.
The Chromium document sometimes incorrectly fires a focus event even though it isn't actually focused. This causes browse mode to be activated when it shouldn't be. Override shouldAllowIAccessibleFocusEvent to block this.
Because we're now using IA2 for the Chromium content, suggestions are now IA2. This breaks isDescendantOf on the UIA ancestor which is called to check whether a selected suggestion should be reported. Override isDescendantOf to compensate for this.