aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/ui.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-06-17 01:34:11 +1000
committerGitHub <noreply@github.com>2018-06-17 01:34:11 +1000
commit3c9c1b4cdcd0eb9076c3f0bafbabb057ee140c42 (patch)
tree90075d3343777a67dc78fcec4c295b140961788e /src/js/ui.js
parentd4abb4b1438cb316aacae480e7b7e9b055a60b24 (diff)
parent599883e684cf72a631ea366d0cb821fcb1c3d013 (diff)
downloadplyr-3c9c1b4cdcd0eb9076c3f0bafbabb057ee140c42.tar.lz
plyr-3c9c1b4cdcd0eb9076c3f0bafbabb057ee140c42.tar.xz
plyr-3c9c1b4cdcd0eb9076c3f0bafbabb057ee140c42.zip
Merge pull request #1041 from sampotts/a11y-improvements
A11y improvements
Diffstat (limited to 'src/js/ui.js')
-rw-r--r--src/js/ui.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index e0d7c6ae..b77ee131 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -7,7 +7,7 @@ import controls from './controls';
import i18n from './i18n';
import support from './support';
import browser from './utils/browser';
-import { getElement, toggleClass, toggleState } from './utils/elements';
+import { getElement, toggleClass } from './utils/elements';
import { ready, triggerEvent } from './utils/events';
import is from './utils/is';
import loadImage from './utils/loadImage';
@@ -132,9 +132,6 @@ const ui = {
// If there's a media title set, use that for the label
if (is.string(this.config.title) && !is.empty(this.config.title)) {
label += `, ${this.config.title}`;
-
- // Set container label
- this.elements.container.setAttribute('aria-label', this.config.title);
}
// If there's a play button, set label
@@ -216,8 +213,10 @@ const ui = {
toggleClass(this.elements.container, this.config.classNames.paused, this.paused);
toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped);
- // Set ARIA state
- toggleState(this.elements.buttons.play, this.playing);
+ // Set state
+ Array.from(this.elements.buttons.play).forEach(target => {
+ target.pressed = this.playing;
+ });
// Only update controls on non timeupdate events
if (is.event(event) && event.type === 'timeupdate') {