From f64c60288719cd697526355f1b6a611470afc3ef Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Wed, 6 Mar 2019 13:20:34 +0500 Subject: [PATCH] Add aria-label toggling for play/pause and fill browser buttons --- .../lib/xmodule/xmodule/js/src/video/04_video_full_screen.js | 4 ++-- .../lib/xmodule/xmodule/js/src/video/09_play_pause_control.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js b/common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js index 3349aa0a7d..b734d8d40d 100644 --- a/common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js +++ b/common/lib/xmodule/xmodule/js/src/video/04_video_full_screen.js @@ -136,7 +136,7 @@ fullScreenClassNameEl.removeClass('video-fullscreen'); $(window).scrollTop(this.scrollPos); this.videoFullScreen.fullScreenEl - .attr('title', gettext('Fill browser')) + .attr({title: gettext('Fill browser'), 'aria-label': gettext('Fill browser')}) .find('.icon') .removeClass('fa-compress') .addClass('fa-arrows-alt'); @@ -158,7 +158,7 @@ this.videoFullScreen.fullScreenState = this.isFullScreen = true; fullScreenClassNameEl.addClass('video-fullscreen'); this.videoFullScreen.fullScreenEl - .attr('title', gettext('Exit full browser')) + .attr({title: gettext('Exit full browser'), 'aria-label': gettext('Exit full browser')}) .find('.icon') .removeClass('fa-arrows-alt') .addClass('fa-compress'); diff --git a/common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js b/common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js index 31d3d68212..04db4d8427 100644 --- a/common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js +++ b/common/lib/xmodule/xmodule/js/src/video/09_play_pause_control.js @@ -74,7 +74,7 @@ this.el .addClass('pause') .removeClass('play') - .attr('title', gettext('Pause')) + .attr({title: gettext('Pause'), 'aria-label': gettext('Pause')}) .find('.icon') .removeClass('fa-play') .addClass('fa-pause'); @@ -84,7 +84,7 @@ this.el .removeClass('pause') .addClass('play') - .attr('title', gettext('Play')) + .attr({title: gettext('Play'), 'aria-label': gettext('Play')}) .find('.icon') .removeClass('fa-pause') .addClass('fa-play');