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:
parent
b9f251650b
commit
6317395e0c
@ -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))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user