Commit 9b9a8159 authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[OsSettingsSearch] Remove redundant a11y announcements.

Remove ChromeVox announcement for the number of results, since the total
number of results is already mentioned in each search result a11y.
This "Displaying x number of search results" is removed not only because
the total number of search results is already mentioned, but also
because it races with the search result a11y announcement itself, and
only loses, sometimes verbalizing and sometimes not.

Final 'general' a11y videos:
https://photos.app.goo.gl/zLPSKH8wySyMhfak9 (search results present)
https://photos.app.goo.gl/bCzC1nR3EtvsM25c7 (no search results)

Fixed: 1071284
Change-Id: I5ec0bbae99e58f4976619790b63188d35d416d50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216286Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771943}
parent d1e63771
...@@ -23,12 +23,6 @@ ...@@ -23,12 +23,6 @@
<message name="IDS_OS_SEARCH_RESULT_ROW_A11Y_RESULT_SELECTED" desc="ChromeVox alert to indicate the position number of a selected result in a list of search results and the selected result text itself, and that the user can press enter to navigate to section described by the search result."> <message name="IDS_OS_SEARCH_RESULT_ROW_A11Y_RESULT_SELECTED" desc="ChromeVox alert to indicate the position number of a selected result in a list of search results and the selected result text itself, and that the user can press enter to navigate to section described by the search result.">
Search result <ph name="LIST_POSITION">$1<ex>1</ex></ph> of <ph name="LIST_SIZE">$2<ex>2</ex></ph>: <ph name="SEARCH_RESULT_TEXT">$3<ex>Network Settings</ex></ph>. Press Enter to navigate to section. Search result <ph name="LIST_POSITION">$1<ex>1</ex></ph> of <ph name="LIST_SIZE">$2<ex>2</ex></ph>: <ph name="SEARCH_RESULT_TEXT">$3<ex>Network Settings</ex></ph>. Press Enter to navigate to section.
</message> </message>
<message name="IDS_OS_SEARCH_BOX_A11Y_ONE_RESULT" desc="ChromeVox alert to indicate the that one search result has been found.">
Displaying 1 search result for <ph name="QUERY">$1<ex>Wi-Fi</ex>.</ph>
</message>
<message name="IDS_OS_SEARCH_BOX_A11Y_RESULT_COUNT" desc="ChromeVox alert to indicate the number of settings search results found.">
Displaying <ph name="NUMBER">$1<ex>1</ex></ph> search results for <ph name="QUERY">$2<ex>Wi-Fi</ex>.</ph>
</message>
<!-- About (OS Settings) --> <!-- About (OS Settings) -->
<message name="IDS_OS_SETTINGS_ABOUT_PAGE_BUILD_DETAILS" desc="Label of the row button that clicks into Build details"> <message name="IDS_OS_SETTINGS_ABOUT_PAGE_BUILD_DETAILS" desc="Label of the row button that clicks into Build details">
......
...@@ -176,29 +176,6 @@ Polymer({ ...@@ -176,29 +176,6 @@ Polymer({
settings.recordSearch(); settings.recordSearch();
}, },
/**
* Causes ChromeVox to announce number of search results.
* @private
*/
makeA11ySearchResultAnnouncement_() {
let a11yAlertText;
switch (this.searchResults_.length) {
case 0:
a11yAlertText = this.i18n('searchNoResults');
break;
case 1:
a11yAlertText = this.i18n('searchResultsOne', this.getCurrentQuery_());
break;
default:
a11yAlertText = this.i18n(
'searchResultsNumber', this.searchResults_.length,
this.getCurrentQuery_());
break;
}
this.fire('iron-announce', {text: a11yAlertText});
},
/** @private */ /** @private */
onNavigatedToResultRowRoute_() { onNavigatedToResultRowRoute_() {
// Settings has navigated to another page; close search results dropdown. // Settings has navigated to another page; close search results dropdown.
...@@ -273,9 +250,8 @@ Polymer({ ...@@ -273,9 +250,8 @@ Polymer({
return; return;
} }
this.makeA11ySearchResultAnnouncement_();
if (!this.searchResultsExist_) { if (!this.searchResultsExist_) {
this.fire('iron-announce', {text: this.i18n('searchNoResults')});
return; return;
} }
......
...@@ -39,8 +39,6 @@ void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) { ...@@ -39,8 +39,6 @@ void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) {
{"searchNoResults", IDS_SEARCH_NO_RESULTS}, {"searchNoResults", IDS_SEARCH_NO_RESULTS},
{"searchResults", IDS_SEARCH_RESULTS}, {"searchResults", IDS_SEARCH_RESULTS},
{"searchResultSelected", IDS_OS_SEARCH_RESULT_ROW_A11Y_RESULT_SELECTED}, {"searchResultSelected", IDS_OS_SEARCH_RESULT_ROW_A11Y_RESULT_SELECTED},
{"searchResultsOne", IDS_OS_SEARCH_BOX_A11Y_ONE_RESULT},
{"searchResultsNumber", IDS_OS_SEARCH_BOX_A11Y_RESULT_COUNT},
// TODO(dpapad): IDS_DOWNLOAD_CLEAR_SEARCH and IDS_HISTORY_CLEAR_SEARCH // TODO(dpapad): IDS_DOWNLOAD_CLEAR_SEARCH and IDS_HISTORY_CLEAR_SEARCH
// are identical, merge them to one and re-use here. // are identical, merge them to one and re-use here.
{"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH}, {"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment