nvda
1938c9a9 - Windows 11 shell (appModules/explorer): classify certain windows as UIA to allow mouse and touch navigation to work while interacting with shell elements (#13691)

Commit
3 years ago
Windows 11 shell (appModules/explorer): classify certain windows as UIA to allow mouse and touch navigation to work while interacting with shell elements (#13691) #13506 (partial) Summary of the issue: Windows 11 UI (shell) elements such as taskbar, notification area, TaskView, Snap layouts, and buttons such as Search and Chat cannot be navigated to and interacted with mosue and touchscreens. Description of how this pull request fixes the issue: Reclassifies the following windows as UIA windows: Shell_TrayWnd: Start, Search, Widgets, other shell elements nadi s the rot shell elements window (not to be conrused with desktop window) Shell_InputSwitchTopLevelWindow: language switcher XamlExplorerHostIslandWindow: Task View and Snap Layouts Most of these have the label of "DesktopWindowXamlSource". The "isGoodUIAWindow" in File Explorer app module was edited to treat these windows as UIA elements provided that they are the ancestors (top-level windows) of windows passed into that method. This is more so for the first window class name (shell root) whereas others can go through just a class name check, but cal winUser.getAncestor with GA_ROOT (2) flag for all windows for consistency. * appModules/explorer: reclassify Windows 11 UI (shell) elements as UIA windows to allow mouse and ouch navigation to work. Re #13506. When using the mouse and/or touch to navigate Windows 11 shell elements such as tskbar and other buttons, NVDA says 'DesktopWindowXamlSource'. This window title is employed from desktop (Win32) apps hosting XAML controls. Reclasifying these controls as well as some top-level windows from IAccessible to UIA does allow mouse and touch interaction to work. Because DesktopWindowXamlSource class label is seen in apps such as Notepad and Windows Terminal (in addition to File Explorer), a comment was added to indicate that a more global solution would be better. But for now at least shell elements can be navigated with mosue and/or touch. * appModules/explorer: check ancestors instead of window class name alone when checking Windows 11 shell elements. Re #13506. Turns out checking just the class name is not enough for shell root window (Shell_TrayWnd) - one needs to check ancestors. Because other windows are top-level windows (such as Task View), class name check will work, but for consistency, call winUser.getAncestor with root (winUser.GA_ROOT (2)) flag. Also add an explanation as to why. * appModules/explorer: use a dedicated variable to store current Windows release. Re #13506. Small optimization: winVersion.getWinVer() can be called up to two times (if running on Windows 11), therefore use a variable to store current Windows release and use it throughout the method. * update changes Co-authored-by: Sean Budd <sean@nvaccess.org>
Author
Parents
Loading