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

Unified Diff: ui/file_manager/video_player/js/media_controls.js

Issue 1840983002: Video Player: Set proper aria-label to the toggle button for subtitles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/media_controls.js
diff --git a/ui/file_manager/video_player/js/media_controls.js b/ui/file_manager/video_player/js/media_controls.js
index 33745c75cf678e65c5036b96762e535210ce3e6b..9111e977c286613be9fcda82471ba5a4e192f568 100644
--- a/ui/file_manager/video_player/js/media_controls.js
+++ b/ui/file_manager/video_player/js/media_controls.js
@@ -536,8 +536,6 @@ MediaControls.prototype.initSubtitlesButton = function() {
this.subtitlesTrack_ = null;
this.subtitlesButton_ =
this.createButton('subtitles', this.onSubtitlesButtonClicked_.bind(this));
- this.subtitlesButton_.setAttribute('aria-label',
- str('VIDEO_PLAYER_SUBTITLES_BUTTON_LABEL'));
};
/**
@@ -562,9 +560,13 @@ MediaControls.prototype.toggleSubtitlesMode_ = function(on) {
if (on) {
this.subtitlesTrack_.mode = 'showing';
this.subtitlesButton_.setAttribute('showing', '');
+ this.subtitlesButton_.setAttribute('aria-label',
+ str('VIDEO_PLAYER_DISABLE_SUBTITLES_BUTTON_LABEL'));
} else {
this.subtitlesTrack_.mode = 'hidden';
this.subtitlesButton_.removeAttribute('showing');
+ this.subtitlesButton_.setAttribute('aria-label',
+ str('VIDEO_PLAYER_ENABLE_SUBTITLES_BUTTON_LABEL'));
}
};
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698