Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: chrome/browser/resources/settings/settings_main/settings_main.js

Issue 2745383002: MD Settings: announce search results (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/settings_main/settings_main.js
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js
index 22b4bd86fb2766ef7145bfac11d076b95fbf0639..402e0614864ccaae6410dfa9400c34dd70244320 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -267,6 +267,15 @@ Polymer({
this.inSearchMode_ = !request.isSame('');
dpapad 2017/03/14 17:07:09 Need to rebase this, after https://codereview.chro
Dan Beam 2017/03/14 18:14:37 Done.
this.showNoResultsFound_ =
this.inSearchMode_ && !request.didFindMatches();
+
+ if (this.inSearchMode_) {
+ Polymer.IronA11yAnnouncer.requestAvailability();
+ this.fire('iron-announce', {
dpapad 2017/03/14 17:07:09 Do you also need { bubbles: true }, per the exampl
Dan Beam 2017/03/14 18:14:37 no, it works without it
+ text: this.showNoResultsFound_ ?
+ loadTimeData.getString('searchNoResults') :
+ loadTimeData.getStringF('searchResults', query)
+ });
+ }
}.bind(this));
}.bind(this), 0);
}.bind(this));

Powered by Google App Engine
This is Rietveld 408576698