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

Unified Diff: chrome/browser/resources/md_downloads/manager.js

Issue 2720473002: MD Downloads: announce search results (Closed)
Patch Set: closure Created 3 years, 10 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/md_downloads/manager.js
diff --git a/chrome/browser/resources/md_downloads/manager.js b/chrome/browser/resources/md_downloads/manager.js
index 743aacd19af0b0cbe9fcdc33e7b1f5e694e74580..d01c3d336a940552c343cf61beb57fdcb8522e12 100644
--- a/chrome/browser/resources/md_downloads/manager.js
+++ b/chrome/browser/resources/md_downloads/manager.js
@@ -89,6 +89,16 @@ cr.define('downloads', function() {
/** @private */
itemsChanged_: function() {
this.hasDownloads_ = this.items_.length > 0;
+
+ if (this.inSearchMode_) {
+ Polymer.IronA11yAnnouncer.requestAvailability();
+ this.fire('iron-announce', {
+ text: this.hasDownloads_ ?
+ loadTimeData.getStringF(
+ 'searchResultsFor', this.$.toolbar.getSearchText()) :
+ this.noDownloadsText_()
+ });
+ }
},
/**
« no previous file with comments | « chrome/browser/resources/md_downloads/manager.html ('k') | chrome/browser/resources/md_downloads/toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698