appModules/explorer: do not treat IAccessible Start button class as UIA element#13723
Merged
Merged
Conversation
…IA window. Re nvaccess#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.
seanbudd
reviewed
May 23, 2022
Comment on lines
+532
to
+536
| ) | ||
| ): | ||
| return True | ||
| # #13717: on some systems, Windows 11 shell elements are reported as IAccessible, | ||
| # notably Start button, causing IAccessible handler to report attribute error when handling events. | ||
| if winUser.getClassName(hwnd) != "Start": |
Member
There was a problem hiding this comment.
this should be added to the parent if statement.
Contributor
Author
|
Hi, makes sense (logical and statements, I see). Thanks.
|
…eck with other class name checks. Re nvaccess#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.
seanbudd
approved these changes
May 23, 2022
This comment was marked as off-topic.
This comment was marked as off-topic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
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):
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.
Known issues with pull request:
None, although it might be possible that there are other Windows 11 shell elements that are showing as IAccessible as opposed to UIA.
Change log entries:
None needed as this is a follow-up to #13691.
Code Review Checklist:
Additional possibilities and context:
This issue occurs regardless of whether or not add-ons are on or off. Also, since Windows 11 shell is a UIA universe by default (checked many times after installing Windows 11 from scratch), it might be possible that something other than #13691 might be causing shell elements to be shown as IAccessible (perhaps a shell overlay or a Windows setting).