Skip to content
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

enable search highlights support #13841

Closed
fernando-jose-silva opened this issue Jun 24, 2022 · 2 comments · Fixed by #14221
Closed

enable search highlights support #13841

fernando-jose-silva opened this issue Jun 24, 2022 · 2 comments · Fixed by #14221
Labels
platform/Windows11 Issues specific to Windows 11
Milestone

Comments

@fernando-jose-silva
Copy link

fernando-jose-silva commented Jun 24, 2022

Steps to reproduce:

Search highlights functionality is available in windows 11 22 h2 and I believe it is coming to other windows versions (EG 11 21 h2) and maybe in the future Windows 10 22 h2 .

Using Windows 11 22H2 (build 22621.160)

  • Run narrator.
  • Press the start menu.
    • Note, Narrator should read the search box plus also read today's highlight.
    • In Brazil today's highlight is viva São João.
  • Exit Narrator and start NVDA.
  • Press the start menu.
    • Note NVDA speech

Actual behavior:

NVDA reports: "search edit"

Expected behavior:

Report "edit search viva São João"

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

nvda.exe, NVDA alpha-25684,ac7215b1

Windows version:

11 22621.160

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.

no

If 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

@seanbudd seanbudd added the platform/Windows11 Issues specific to Windows 11 label Jun 30, 2022
@josephsl
Copy link
Collaborator

Hi,

Three months later... I see what's going on.

Technical: a new child element (Automation Id: PlaceholderTextContentPresenter) was added to Start search box control in Windows 11 Version 22H2 (subsequently backported to Windows 11 Version 21H2), containing "today's search" (search highlights) text as described above. It appears Narrator is using this text as part of an element property, and if NVDA can detect it, it becomes possible to implement the resolution for this issue (ideally as part of SearchUI app module's Start search field class).

In the meantime, I will take care of it in a slightly different form as part of Windows App Essentials add-on - when focus moves to Start search box, NVDA will queue search highlights text announcement. It would be great if someone takes care of this in NVDA Core, both as a learning experience and for me to do more important things in life; I might look into it if no-one steps up by say, late December 2022 or early January 2023 (too late for 2022.4, I think).

Thanks.

@josephsl
Copy link
Collaborator

josephsl commented Oct 1, 2022

Hi,

Found it - while I haven't found the actual property for it, using object description would provide a similar experience. In short, this involes adding a "get_description" method to Start search field class in SearchUI app module, which involves looking for an element with a specific Automation Id, then pulling it as the search field description.

As 2022.4 beta release is quite close at hand, I'm debating whether or not to queue this for the upcoming release or wait until 2023.1 development is in full swing. In the meantime, I'll post a pull request to resolve this issue.

Thanks.

josephsl added a commit to josephsl/nvda that referenced this issue Oct 8, 2022
… 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.
josephsl added a commit to josephsl/nvda that referenced this issue Oct 9, 2022
…s#13841.

Comment from Sean Budd (NV Access): add type hint please (returns str).
seanbudd added a commit that referenced this issue Oct 10, 2022
…n Windows 11 (#14221)

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.

* appModules/searchui: add support for Search HIghlights anouncement in Windows 11 . Re #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.

* appModules/searchui: add type hint for description getter. Re #13841.

Comment from Sean Budd (NV Access): add type hint please (returns str).

* update changes

Co-authored-by: Sean Budd <sean@nvaccess.org>
@nvaccessAuto nvaccessAuto added this to the 2023.1 milestone Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/Windows11 Issues specific to Windows 11
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants