[PR #19726] Improve screen reader announcements for search box #31937

Open
opened 2026-01-31 09:50:30 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19726

State: closed
Merged: Yes


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:

  • previously, the results were only read occasionally. Moving the block out of if (results.SearchInvalidated) fixes that.
  • previously, we read "Results found" or "No results found". Now, we read an accessible version of the written status message.

In order to maintain consistency with the written status message, _FormatText() now takes an isAccessible parameter to output a more accessible version of the text. Specifically...

  • CurrentIndexTooHighStatus (aka ?) would not be read, so we replace it with TermControl_UnknownSearchResultIndex (aka unknown)
  • TermControl_TooManySearchResults (aka 999+) would drop the + when read, so we replace it with TermControl_TooManySearchResults (aka over 999)
  • TermControl_NumResults (aka {0}/{1}``) would be read as a fraction, so we replace it with TermControl_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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19726 **State:** closed **Merged:** Yes --- ## 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: - previously, the results were only read occasionally. Moving the block out of `if (results.SearchInvalidated)` fixes that. - previously, we read "Results found" or "No results found". Now, we read an accessible version of the written status message. In order to maintain consistency with the written status message, `_FormatText()` now takes an `isAccessible` parameter to output a more accessible version of the text. Specifically... - `CurrentIndexTooHighStatus` (aka `?`) would not be read, so we replace it with `TermControl_UnknownSearchResultIndex` (aka `unknown`) - `TermControl_TooManySearchResults` (aka `999+`) would drop the `+` when read, so we replace it with `TermControl_TooManySearchResults` (aka `over 999`) - `TermControl_NumResults` (aka `{0}/{1}``) would be read as a fraction, so we replace it with `TermControl_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
claunia added the pull-request label 2026-01-31 09:50:30 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31937