Improve screen reader announcements for search box#19726
Merged
carlos-zamora merged 3 commits intomainfrom Jan 14, 2026
Merged
Conversation
Member
Author
This is the main one I want double checked. Is that okay for localized scenarios? |
carlos-zamora
added a commit
that referenced
this pull request
Jan 13, 2026
lhecker
reviewed
Jan 13, 2026
| if (currentMatch < 0 || currentMatch > (MaximumTotalResultsToShowInStatus - 1)) | ||
| { | ||
| currentString = CurrentIndexTooHighStatus; | ||
| currentString = isAccessible ? RS_(L"TermControl_UnknownSearchResultIndex") : CurrentIndexTooHighStatus; |
Member
There was a problem hiding this comment.
Another option would be to pass the "too high" and "format" strings as string arguments instead.
lhecker
approved these changes
Jan 13, 2026
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.
Summary of the Pull Request
Improves the notification read out by a screen reader when a search is done in the terminal. This is done across several scenarios:
if (results.SearchInvalidated)fixes that.In order to maintain consistency with the written status message,
_FormatText()now takes anisAccessibleparameter to output a more accessible version of the text. Specifically...CurrentIndexTooHighStatus(aka?) would not be read, so we replace it withTermControl_UnknownSearchResultIndex(akaunknown)TermControl_TooManySearchResults(aka999+) would drop the+when read, so we replace it withTermControl_TooManySearchResults(akaover 999)TermControl_NumResults(aka{0}/{1}``) would be read as a fraction, so we replace it withTermControl_NumResultsAccessible(aka{0} of {1}`).Validation Steps Performed
✅ Announcements are read out when interacting with search box (i.e. next, prev, regex toggle, etc.)
✅ "4 of 5" read out by screen reader (or something similar) when search is performed
Closes #19691