Add aria attributes to audio player
authorBoris Bobrov <breton@cynicmansion.ru>
Sun, 2 Apr 2017 20:25:56 +0000 (23:25 +0300)
committerBoris Bobrov <breton@cynicmansion.ru>
Sun, 2 Apr 2017 20:25:56 +0000 (23:25 +0300)
I hope this helps a bit with mediagoblin accessibility

mediagoblin/templates/mediagoblin/media_displays/audio.html

index 4e7f9f820267662333ba6fb6644be06b3e4ffd62..0ab1b694861a1377e72d045c8df278dbd6cbddf7 100644 (file)
@@ -33,9 +33,9 @@
           <div class="playhead"></div>
           <div class="buffered-indicators"></div>
           <div class="seekbar"></div>
-          <div class="audio-control-play-pause paused">▶</div>
-          <div class="audio-currentTime">00:00</div>
-          <input type="range" class="audio-volume" value="1" min="0" max="1" step="0.001" />
+          <div class="audio-control-play-pause paused" aria-label="Play">▶</div>
+          <div class="audio-currentTime" aria-label="current time">00:00</div>
+          <input type="range" class="audio-volume" value="1" min="0" max="1" step="0.001" aria-label="volume" />
          <img src="{{ request.app.public_store.file_url(
                        media.media_files.spectrogram) }}"
               alt="Spectrogram" />