Merge pull request #1525 from lunika/play-button-aria

️(controls) change play button aria-label value when its state change
This commit is contained in:
Sam Potts 2020-01-13 16:09:04 +00:00 committed by GitHub
commit 3a1da5ad36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,7 @@ const ui = {
// Set state
Array.from(this.elements.buttons.play || []).forEach(target => {
Object.assign(target, { pressed: this.playing });
target.setAttribute('aria-label', i18n.get(this.playing ? 'pause' : 'play', this.config));
});
// Only update controls on non timeupdate events