Skip to content

Commit 07c73dc

Browse files
authored
Merge 072d882 into 64301ba
2 parents 64301ba + 072d882 commit 07c73dc

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

source/appModules/explorer.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,12 +506,32 @@ def event_gainFocus(self, obj, nextHandler):
506506
nextHandler()
507507

508508
def isGoodUIAWindow(self, hwnd):
509+
currentWinVer = winVersion.getWinVer()
509510
# #9204: shell raises window open event for emoji panel in build 18305 and later.
510511
if (
511-
winVersion.getWinVer() >= winVersion.WIN10_1903
512+
currentWinVer >= winVersion.WIN10_1903
512513
and winUser.getClassName(hwnd) == "ApplicationFrameWindow"
513514
):
514515
return True
516+
# #13506: Windows 11 UI elements such as Taskbar should be reclassified as UIA windows,
517+
# letting NVDA announce shell elements when navigating with mouse and/or touch,
518+
# notably when interacting with windows labeled "DesktopWindowXamlSource".
519+
# WORKAROUND UNTIL A PERMANENT FIX IS FOUND ACROSS APPS
520+
if (
521+
currentWinVer >= winVersion.WIN11
522+
# Traverse parents until arriving at the top-level window with the below class names.
523+
# This is more so for the shell root (first class name), and for others, class name check would work
524+
# since they are top-level windows for windows shown on screen such as Task View.
525+
# However, look for the ancestor for consistency.
526+
and winUser.getClassName(winUser.getAncestor(hwnd, winUser.GA_ROOT)) in (
527+
# Windows 11 shell UI root, housing various shell elements shown on screen if enabled.
528+
"Shell_TrayWnd", # Start, Search, Widgets, other shell elements
529+
# Top-level window class names from Windows 11 shell features
530+
"Shell_InputSwitchTopLevelWindow", # Language switcher
531+
"XamlExplorerHostIslandWindow", # Task View and Snap Layouts
532+
)
533+
):
534+
return True
515535
return False
516536

517537
def event_UIA_window_windowOpen(self, obj, nextHandler):

0 commit comments

Comments
 (0)