-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 11 Design Elements Are Not Reported by NVDA When Mouse Tracking Is On #13506
Comments
Hi, Can you tell us things Narrator says so we can investigate what's going on? Technical: these design elements expose class names as their label (name). Thanks. |
Hi, Also, note that design elements are not really the same thing as item labels, and I think that could confuse people. Thanks. |
I have the same problem. Also, I noticed that its happening with almost all new ms apps like windows terminal for example. I assume that some library used in these apps/elements is making an issue. Also, I think there is a way to fix the problem with taskbar. Actualy, in windows 11, there is some kind of a cover on top of the taskbar. This cover makes nvda read that instead of the actual taskbar when you hover over it. You can test this by simply hovering over the top edge of the taskbar. If there is a way to remove this, the taskbar will work. Also, by removing that cover you will restore the old taskbar context menus :D. I will update this comment if my theory about the taskbar turns out to be true |
The name or tooltip of the Start Menu, pinned applications, and system tray items (including date and time) in the Taskbar is not reported by NVDA. In Windows Explorer, buttons and menus on the bar that Narrator calls "Application Bar" (ex: new, cut, copy, rename buttons and sort, view menus) are not spoken. I said "design element" because I had this problem in applications updated according to this design, which came with the new design of Widnows 11. My fault. |
Hi, About terminology: yep, I can see why it can be confusing. Also another technical note: until Windows 10 at least shell elements such as Start button label was exosed as a MSAA (Microsoft Active Accessibility) objects, whereas they are seen as UIA (UI Automation) objects in Windows 11. Thanks. |
Hi, Dramatic turn: this explains why touch hover gesture (hold down one finger while navigating the screen) is not effective in Windows 11 taskbar - no item announcement when one hovers around the bottom of the screen. I will raise a separate issue for touchscreen interaction as looks like these might be related. Thanks. |
Hi, April 2022 update: telling NVDA to treat DesktopWindowXamlSource objects as UIA fixes it for BOTH mouse and touch interaction. Note that there are multiple elements with this "label", so the easy fix will require informing the File Explore app module that these elements are indeed UIA objects. I'll come up with a prototype fix via Windows App Essentials add-on if possible (possibly later today which will require changes to File Explorer app module). Thanks. |
Hi, Update: yes, UIA element reclassification fixes it. For folks wishing to write a pull request (I can do so next week if needed), the following window class names must be checked from isGoodUIAWindow method in File Explorer app module class: MSTaskSwWClass (parts of taskbar), TrayNotifyWnd (systray list), ToolbarWindow32 (toolbar), ReBarWindow32 (parts of taskbar), Shell_TrayWnd (taskbar). Of course you must make sure this is Windows 11 or later. I'm sure there is a much better solution. Thanks. |
Hi, For Windows 11 Notepad, a window with the class name of "Notepad" shuold be treated as good UIA window. Because of this, a solution that works across programs is ideal. Additional findings:
As for pull requests, while I may not be able to come up with a solution that works across apps (I'm exhausted), I can do something about at least File Explorer (Windows 11 Notepad will be handled via Windows App Essentials for now). CC @michaelDCurran in case you heard something from XAML team inside Microsoft. Thanks. |
Just out of interest I've looked into this briefly and I'm not understanding something here. Given that NVDA correctly decides to use UIA for these controls when accessed via keyboard why the same fails when done via mouse / touch screen. In other words why |
Hi, that’s a good question – I thought about experimenting with object from point function to see if underlying element can be fetched, but figured that it may as well have to do with the UI framework in use. By the way, any updates from the person who wanted to see if “removing a cover” from the screen might help with this situation?
|
I'm not sure if this is really possible or not, but can't any window with the role of unknown or pane and name of "DesktopWindowXamlSource" be considered a good UIA window? I don't think adding window class names will work, as a name needs to be added for each app, for example mouse navigation on windows terminal is broken and it has the window lass name of "CASCADIA_HOSTING". |
Hi, in theory, yes but remember that these windows host XAML/UIA elements while they themselves are part of classic apps (some apps use UIA while others are MSAA universes). The most effective way (besides asking for WinUI changes) is gathering a unique data from these windows as part of UIA handler thread and telling NVDA right then that these are good windows (see source/UIAHandler/__init__.py/UIAHandler class for details). As noted in the Windows App Essentials I linked to in this issue, I’m taking a two-pronged approach (global plugin and app module method) until a more general solution is found. Thanks.
|
Hi, UIA reclassification method cannot be used with Windows Terminal - if I do it, when the mouse moves to terminal window, the app crashes. This is observed with both global plugin and app module method. Thanks. |
Hi, Expect a pull request to resolve part of this issue soon - likely limited to cover shell elements such as Taskbar as this is one of the most prominent areas of the operating system and likely to be navigated with mouse and/or touch. Notepad and File Explorer command bar (that's what they are really) may or may not be covered. P.S. In the upcoming pull request, File Explorer app module will state that a more permanent solution be found and my workaround removed once that happens. Thanks. |
Hi, May 2022 update: until a general solution is found, for File Explorer/shell elements, the following solutions are available that involves good UIA window method:
Even with one or more of these solutions implemented, the pull request MUST include a note that a more general solution is ideal to cover other programs such as Notepad and Windows Terminal. I'm leaning toward either a second or a third solution unless folks believe the first solution is better or offer something completely different (including unexpected solutions). In summary:
Next steps: within the next 72 hours, a PR will be submitted which will implement the third solution unless folks prefer something else in the meantime. Thanks. |
@josephsl while this issue is somewhat outside my area of study, a thought occurs. Your solution 2, in the last comment, seems like, from your description, to be the least likely to come up with false results. However it is slow. |
Hi, caching doesn’t help (thought about it yesterday) as isGoodUIAWindow relies on a window handle (hwnd), and the handle changes every time a shell element such as Task View opens. There are many documented instances where this is happening, and Windows 11 UI is one of these (recent) cases. We can cache things (or use mechanisms such as LRU (least recently used)) if method arguments remain the same across calls but this is clearly not the case. Thanks.
|
Hi, Upon further testing, solution 2 will be the way to go (no performance issues observed while testing compared to solutions 1 and 3) - implementing solution 3 causes NVDA to say "system" when Alt+Space is pressed instead of it saying "restore" as before (regression). Also, adding isGoodUIAWindow to check for UI design elements will change UIA tree as seen by NVDA (at least observed in Notepad), requiring edits to code that traverses the object hierarchy to locate things; thankfully it doesn't affect File Explorer. Pull request incoming (I may not respond to reviews until late May but a PR will be provided for commenting or solutions to be offered by others). Thanks. |
… windows to allow mouse and ouch navigation to work. Re nvaccess#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.
…ne when checking Windows 11 shell elements. Re nvaccess#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.
…s release. Re nvaccess#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.
…IA 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>
…IA element (#13723) Fixes a possible regression from #13691 Follow-up to #13506 Fixes #13717 Summary of the issue: On some Windows 11 systems, Start button is seen as IAccessible object rather than UIA element. This causes IAccessible handler to report attribute error when handling events as an attribute is not present in UIA elements. Description of how this pull request fixes the issue: On the surface, Start button window class name (Start) should be classified as a bad UIA window. However, when handling events from UIA handler thread, good UIA windows are checked before looking for bad UIA window class names. Because File Explorer's good UIA window method checks for the root element (the element being the ancestor of Start button), bad UIA window class name will not et a chance to detect IAccessible Start button. Therefore edit good UIA window method instead by checking for the specific class name in Windows 11. Testing strategy: Manual testing: Prerequisites: Windows 11 Version 21H2 or later (test systems are running Version 22H2 preview (build 22621 beta): Run a build from this branch. Press Windows+D to show Desktop. Press Tab to move through shell elements such as Start button, Task View button, Taskbar, notification area, and back to Desktop. While performing step 3, make sure NVDA is saying something. For detailed debug output, enable IAccessible and UIA debugging from Advanced settings panel, restart NVDA with debug logging enabled, then perform steps 2 through 4 from aboveabove. Then open the log and see what IAccessible and UIA handlers are saying about focus events. * appModules/explorer: do not treat IAccessible Start button class as UIA window. Re #13717. Reported by a user: on some systems, Windows 11 Start button is seen as IAccessible (MSAA), not UIA, causing IAccessible handler to report AttributeError since event ID could not be found in UIA objects. Therefore in File Explorer app module, do not treat IAccessible Start button (window class name: Start) as UIA element. * appModules/explorer: combine Start button IAccessible object class check with other class name checks. Re #13717. Tip from Sean Budd (NV Access): move Start button class name check to the parent boolean - that is, package Windows 11 + shel elements + excluding IAccessible Start button under 'logical and' check.
When checking the change log translation, I have found a wrong reference in an item of the change log. I have thus checked all the refs for 2022.2. Link to issue number: None Follow-up of various issues. Summary of the issue: Some of the GitHub references in the change log were targetting wrong issue or PR. Description of user facing changes The references have been fixed in the change log document. Description of development approach Fixed the following references: Fixup of PR 13082: fix a misspell in DefaultAppArgs and no longer use globalVars.appArgs in a boolean context (#13386) #13386 replaced by Windows 10/11 Calculator: allow NVDA to announce more operations by suppressing only a limited number of keyboard commands #13383 Revert "Update to py2exe 0.11.0.1 (#13066)" #13508 replaced by Windows 11 Design Elements Are Not Reported by NVDA When Mouse Tracking Is On #13506 Fixup of PR 13082: fix a misspell in DefaultAppArgs and no longer use globalVars.appArgs in a boolean context (#13386) #13386 (bis) replaced by Windows 11 Notepad: status bar is not announced #13688 Also, I have replaced #13276 (Libre Office issue) by #13277 (associated PR) since the issue description is not related at all with the change for developers.
Hi, November 2023 update: I think I found a possibly more general solution: use windowUtils.findDescendantWindow(hwnd, className="Windows.UI.Composition.DesktopWindowContentBridge"). Looks like the issue with Windows Terminal where mouse movement crashes it is gone. The bigger problem: how do we detect top-level windows and at which point should we check for descendants? Thanks. |
Steps to reproduce:
Actual behavior:
NVDA will just say "DesktopWindowXamlSource" instead of naming items.
The same is true for all applications developed with Windows 11's new Flat Design. Like PowerToys that don't come pre-installed with Windows.
Narrator items read their names as expected.
Expected behavior:
NVDA must accurately report information on items, as Narrator does.
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
NVDA 2021.3.4
Windows version:
Windows 11 Version 10.0.22000.588 Build 22000.588
Name and version of other software in use when reproducing the issue:
Other information about your system:
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes
The text was updated successfully, but these errors were encountered: