Skip to content

Commit

Permalink
Add appropriate aria label to slider in audio component to improve ac…
Browse files Browse the repository at this point in the history
…cessibility, for #604
  • Loading branch information
poojagunturu96 committed Aug 26, 2024
1 parent ad4136f commit c77591c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/js/components/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Slider extends Component<SliderProps> {

return (
<div class="slider">
<label htmlFor={id} class="slider__label">
<label htmlFor={id} id={`${id}-label`} class="slider__label">
{label}
</label>
<div
Expand All @@ -73,6 +73,7 @@ class Slider extends Component<SliderProps> {
id={id}
class="slider__handle"
role="slider"
aria-labelledby={`${id}-label`}
style={{
width: sliderLeft + '%'
}}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/paragraphs/audio.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<div class="audio__body">
<h3 class="audio__title" id="midd-audio-title-1">Audio title</h3>
<p class="audio__text" id="midd-audio-text-1">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Reiciendis commodi placeat, perferendis ratione vitae officiis vero. Commodi ullam fugiat expedita qui veritatis adipisci minus quod neque! Voluptatum tempora iure quo.</p>
{% include 'partials/transcript.twig' with { id: 999 } %}
{% include 'partials/transcript.twig' with { id: random(1234) } %}
</div>
</div>

0 comments on commit c77591c

Please sign in to comment.