appModules/searchui: add support for Search Highlights announcement in Windows 11#14221
Merged
seanbudd merged 3 commits intoOct 10, 2022
Merged
Conversation
… Windows 11 . Re nvaccess#13841. In Windows 11 (21H2 and 22H2), Search Highlights was added - a text with top search suggestion of the day. The highlight text lives in the last child of search box element with a specific UIA Automation Id, so try detecting this and incorporate its name as search field description, allowing search highlight text to be announced when entering Start menu. Of course if search highlights is not present (Windows 10), return whatever description the base UIA object provides.
seanbudd
reviewed
Oct 9, 2022
| # #7370: do not announce text when start menu (searchui) closes. | ||
| announceNewLineText = False | ||
|
|
||
| def _get_description(self): |
Member
There was a problem hiding this comment.
Is this the correct type?
Suggested change
| def _get_description(self): | |
| def _get_description(self) -> str: |
Contributor
Author
|
Hi, you’re right – I think we might as well use this as a reason for developers/contributors to add type hints in future code. Thanks.
|
…s#13841. Comment from Sean Budd (NV Access): add type hint please (returns str).
seanbudd
approved these changes
Oct 10, 2022
See test results for failed build of commit e0ecd4f1da |
See test results for failed build of commit e0ecd4f1da |
See test results for failed build of commit e0ecd4f1da |
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 #13841
Summary of the issue:
In Windows 11, NVDA does not announce search highlights when entering Start menu.
Description of user facing changes
In Windows 11 21H2 and 22H2, NVDA will announce search highlights as part of the search box description (example: search box edit type here to search, search highlight text).
Description of development approach
_get_description method is introduced in appModules.searchui.StartMenuSearchField class that will obtain search highlights text (last child of the search box element with a unique UIA Automation Id) and treat it as the description text for the search field. To account for Windows 10 and to handle search results display (when search highlights text is unavailable), return the description provided by base UIA object if search highlights element is gone. With this change, if no search term is entered, NVDA will announce search highlights as part of search field description in speech and braille.
Testing strategy:
Manual testing (cannot be tested with Appveyor as it uses Windows Server 2019 so no search highlights there):
Requirements: Windows 11 Version 21H2 build 22000.800 or above, Version 22H2 build 22621.521 and later:
Known issues with pull request:
Braille is not updated when search terms are entered into Start menu search field, more towards a limitation of not refreshing element properties when it changes. This may require a fix from braille output side unless the PR approach is the cause.
Change log entries:
Can be both a new feature and a bug fix, will leave it up to NV Access to decide what's better (sensitive to Windows 10 Version 22H2 feature set as Search Highlights may or may not be backported to Vibranium):
In Windows 11, NVDA will announce search highlights when opening Start menu. (#13841)
Code Review Checklist:
Additional context:
https://blogs.windows.com/windows-insider/2022/06/16/releasing-windows-11-build-22000-766-to-the-release-preview-channel/