From: Boris Bobrov Date: Sun, 2 Apr 2017 22:52:14 +0000 (+0300) Subject: Change aria-text when state changes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=daecc3e1838bc7f592897344cd3751315b0321a9;p=mediagoblin.git Change aria-text when state changes --- diff --git a/mediagoblin/static/js/audio.js b/mediagoblin/static/js/audio.js index 909307f6..36b4eab2 100644 --- a/mediagoblin/static/js/audio.js +++ b/mediagoblin/static/js/audio.js @@ -155,14 +155,16 @@ var audioPlayer = new Object(); switch (state) { case audioPlayer.PLAYING: - $('.audio-spectrogram .audio-control-play-pause') + el = $('.audio-spectrogram .audio-control-play-pause') .removeClass('paused').addClass('playing') - .text('▮▮'); + .text('▮▮').attr('aria-label', 'Pause'); + el[0].setAttribute('aria-label', 'Pause') break; case audioPlayer.PAUSED: - $('.audio-spectrogram .audio-control-play-pause') + el = $('.audio-spectrogram .audio-control-play-pause') .removeClass('playing').addClass('paused') - .text('▶'); + .text('▶').attr('aria-label', 'Play'); + el[0].setAttribute('aria-label', 'Play') break; } };