0

Add accessible name to search result categories.

This CL updates the accessible name for search result list views to
clarify when the user switches over to a new category of search results
when ChromeVox is enabled.

Bug: 1311010
Change-Id: I072ae7b657713ea582de76a1e990fba651b2e459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3572299
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Auto-Submit: Yulun Wu <yulunwu@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989542}
This commit is contained in:
Yulun Wu
2022-04-06 18:39:44 +00:00
committed by Chromium LUCI CQ
parent 3cb2bdffd1
commit 13c88bcaec
3 changed files with 7 additions and 1 deletions

@ -244,7 +244,9 @@ void SearchResultListView::SetListType(SearchResultListType list_type) {
break;
}
GetViewAccessibility().OverrideName(title_label_->GetText());
GetViewAccessibility().OverrideName(l10n_util::GetStringFUTF16(
IDS_ASH_SEARCH_RESULT_CATEGORY_LABEL_ACCESSIBLE_NAME,
title_label_->GetText()));
#if DCHECK_IS_ON()
switch (list_type_.value()) {

@ -1661,6 +1661,9 @@ This file contains the strings for ash.
<message name="IDS_ASH_SEARCH_KEY" desc="Name of [Search] key name. This name should be lower case.">
search
</message>
<message name="IDS_ASH_SEARCH_RESULT_CATEGORY_LABEL_ACCESSIBLE_NAME" desc="Template for the accessible name for categorized search result lists that are shown in launcher search. The placeholder will be replaced with the name of a category of search results.">
<ph name="CATEGORY">$1<ex>Best Match</ex></ph> , search result category
</message>
<message name="IDS_ASH_SEARCH_RESULT_CATEGORY_LABEL_BEST_MATCH" desc="Category title for the list of search result shown in launcher search that are a best match for the query in the search box.">
Best Match
</message>

@ -0,0 +1 @@
630ccc52994cc1170764cb569ffb00bf5d24bd95