@@ -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