Index: ui/file_manager/gallery/js/gallery.js |
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js |
index 1bbde3214667fb4923938b0c8da90762a0dce4e4..79cae82a7e9e5005d5cdd7197ff033f1f57fe77e 100644 |
--- a/ui/file_manager/gallery/js/gallery.js |
+++ b/ui/file_manager/gallery/js/gallery.js |
@@ -506,6 +506,7 @@ Gallery.prototype.setCurrentMode_ = function(mode) { |
this.container_.setAttribute('mode', this.currentMode_.getName()); |
this.updateSelectionAndState_(); |
+ this.updateModeButtonAttribute_(); |
}; |
/** |
@@ -538,6 +539,17 @@ Gallery.prototype.onChangeToSlideMode_ = function() { |
}; |
/** |
+ * Update attributes of slide/thumbnail toggle button |
+ * @private |
+ */ |
+Gallery.prototype.updateModeButtonAttribute_ = function() { |
+ if (this.currentMode_ === this.slideMode_) |
+ this.modeSwitchButton_.setAttribute("aria-label", str("GALLERY_THUMBNAIL")); |
+ else |
+ this.modeSwitchButton_.setAttribute("aria-label", str("GALLERY_SLIDE")); |
+}; |
+ |
+/** |
* Change current mode. |
* @param {!(SlideMode|ThumbnailMode)} mode Target mode. |
* @param {Event=} opt_event Event that caused this call. |