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

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

Issue 569123003: Video Player: Add accessibility annotations to cast menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | ui/file_manager/video_player/js/video_player_scripts.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index b941805ccdc13c36163bf96b1d00ac8921ec3a69..074cd2f869df8bdb65f2f253c6dafabb28c079e2 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -93,8 +93,7 @@ FullWindowVideoControls.prototype = { __proto__: VideoControls.prototype };
*/
FullWindowVideoControls.prototype.showErrorMessage = function(message) {
var errorBanner = document.querySelector('#error');
- errorBanner.textContent =
- loadTimeData.getString(message);
+ errorBanner.textContent = loadTimeData.getString(message);
errorBanner.setAttribute('visible', 'true');
// The window is hidden if the video has not loaded yet.
@@ -257,10 +256,6 @@ VideoPlayer.prototype.prepare = function(videos) {
else
videoPlayerElement.removeAttribute('multiple');
- document.querySelector('#cast-menu').setAttribute(
- 'playon-text',
- loadTimeData.getString('VIDEO_PLAYER_PLAY_ON'));
-
document.addEventListener('keydown', reloadVideo);
document.addEventListener('click', reloadVideo);
};
@@ -331,8 +326,6 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
if (this.currentCast_) {
videoPlayerElement.setAttribute('casting', true);
- document.querySelector('#cast-name-label').textContent =
- loadTimeData.getString('VIDEO_PLAYER_PLAYING_ON');
document.querySelector('#cast-name').textContent =
this.currentCast_.friendlyName;
@@ -567,6 +560,7 @@ VideoPlayer.prototype.setCastList = function(casts) {
var item = new cr.ui.MenuItem();
item.label = loadTimeData.getString('VIDEO_PLAYER_PLAY_THIS_COMPUTER');
+ item.setAttribute('aria-label', item.label);
item.castLabel = '';
item.addEventListener('activate', this.onCastSelected_.wrap(this, null));
menu.appendChild(item);
@@ -574,6 +568,7 @@ VideoPlayer.prototype.setCastList = function(casts) {
for (var i = 0; i < casts.length; i++) {
var item = new cr.ui.MenuItem();
item.label = casts[i].friendlyName;
+ item.setAttribute('aria-label', item.label);
item.castLabel = casts[i].label;
item.addEventListener('activate',
this.onCastSelected_.wrap(this, casts[i]));
@@ -662,6 +657,7 @@ var player = new VideoPlayer();
function initStrings(callback) {
chrome.fileManagerPrivate.getStrings(function(strings) {
loadTimeData.data = strings;
+ i18nTemplate.process(document, loadTimeData);
callback();
}.wrap(null));
}
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/video_player_scripts.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698