Change aria-text when state changes
This commit is contained in:
parent
697e6c5cbc
commit
daecc3e183
@ -155,14 +155,16 @@ var audioPlayer = new Object();
|
|||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case audioPlayer.PLAYING:
|
case audioPlayer.PLAYING:
|
||||||
$('.audio-spectrogram .audio-control-play-pause')
|
el = $('.audio-spectrogram .audio-control-play-pause')
|
||||||
.removeClass('paused').addClass('playing')
|
.removeClass('paused').addClass('playing')
|
||||||
.text('▮▮');
|
.text('▮▮').attr('aria-label', 'Pause');
|
||||||
|
el[0].setAttribute('aria-label', 'Pause')
|
||||||
break;
|
break;
|
||||||
case audioPlayer.PAUSED:
|
case audioPlayer.PAUSED:
|
||||||
$('.audio-spectrogram .audio-control-play-pause')
|
el = $('.audio-spectrogram .audio-control-play-pause')
|
||||||
.removeClass('playing').addClass('paused')
|
.removeClass('playing').addClass('paused')
|
||||||
.text('▶');
|
.text('▶').attr('aria-label', 'Play');
|
||||||
|
el[0].setAttribute('aria-label', 'Play')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user