1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-24 08:42:25 +02:00

@OwenEdwards fixed double-localization of mute toggle control text. closes #3017

This commit is contained in:
Owen Edwards 2016-01-25 19:38:28 -05:00 committed by Gary Katsevman
parent b9f251650b
commit 6317395e0c
2 changed files with 3 additions and 3 deletions

View File

@ -6,6 +6,7 @@ CHANGELOG
* @OwenEdwards Fixed menu keyboard access and ARIA labeling for screen readers ([view](https://github.com/videojs/video.js/pull/3033))
* @OwenEdwards Fixed volume menu keyboard access ([view](https://github.com/videojs/video.js/pull/3034))
* @mister-ben made $primary-foreground-color a !default sass var ([view](https://github.com/videojs/video.js/pull/3003))
* @OwenEdwards fixed double-localization of mute toggle control text ([view](https://github.com/videojs/video.js/pull/3017))
--------------------

View File

@ -76,9 +76,8 @@ class MuteToggle extends Button {
// This causes unnecessary and confusing information for screen reader users.
// This check is needed because this function gets called every time the volume level is changed.
let toMute = this.player_.muted() ? 'Unmute' : 'Mute';
let localizedMute = this.localize(toMute);
if (this.controlText() !== localizedMute) {
this.controlText(localizedMute);
if (this.controlText() !== toMute) {
this.controlText(toMute);
}
/* TODO improve muted icon classes */