| Index: chrome/browser/resources/md_bookmarks/toast_manager.js
|
| diff --git a/chrome/browser/resources/md_bookmarks/toast_manager.js b/chrome/browser/resources/md_bookmarks/toast_manager.js
|
| index 642ce3828deb3e72d8052b014cbcaee892b180ab..3692b5f949b478d543d52c3a1a2bd2d1050e6ac3 100644
|
| --- a/chrome/browser/resources/md_bookmarks/toast_manager.js
|
| +++ b/chrome/browser/resources/md_bookmarks/toast_manager.js
|
| @@ -19,7 +19,8 @@ cr.define('bookmarks', function() {
|
| /** @private */
|
| open_: {
|
| type: Boolean,
|
| - reflectToAttribute: true,
|
| + observer: 'openChanged_',
|
| + value: false,
|
| },
|
|
|
| /** @private */
|
| @@ -36,6 +37,9 @@ cr.define('bookmarks', function() {
|
| attached: function() {
|
| assert(ToastManager.instance_ == null);
|
| ToastManager.instance_ = this;
|
| + Polymer.RenderStatus.afterNextRender(this, function() {
|
| + Polymer.IronA11yAnnouncer.requestAvailability();
|
| + });
|
| },
|
|
|
| /** @override */
|
| @@ -82,6 +86,7 @@ cr.define('bookmarks', function() {
|
| showInternal_: function(showUndo) {
|
| this.open_ = true;
|
| this.showUndo_ = showUndo;
|
| + this.fire('iron-announce', {text: this.$.content.textContent});
|
|
|
| if (!this.duration)
|
| return;
|
| @@ -90,13 +95,15 @@ cr.define('bookmarks', function() {
|
| this.timerProxy_.clearTimeout(this.hideTimeoutId_);
|
|
|
| this.hideTimeoutId_ = this.timerProxy_.setTimeout(function() {
|
| - this.open_ = false;
|
| + this.hide();
|
| this.hideTimeoutId_ = null;
|
| }.bind(this), this.duration);
|
| },
|
|
|
| hide: function() {
|
| this.open_ = false;
|
| + // Hide the undo button to prevent it from being accessed with tab.
|
| + this.showUndo_ = false;
|
| },
|
|
|
| /** @private */
|
| @@ -104,6 +111,11 @@ cr.define('bookmarks', function() {
|
| // Will hide the toast.
|
| this.fire('command-undo');
|
| },
|
| +
|
| + /** @private */
|
| + openChanged_: function() {
|
| + this.$.toast.setAttribute('aria-hidden', String(!this.open_));
|
| + },
|
| });
|
|
|
| /** @private {?bookmarks.ToastManager} */
|
|
|