Skip to content

Commit

Permalink
fix(Carousel): add missing aria-label on dots (#2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
madebyfabian authored Oct 29, 2024
1 parent 77d18d8 commit 03dd1eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/runtime/components/Carousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ defineExpose({

<div v-if="dots" :class="ui.dots({ class: props.ui?.dots })">
<template v-for="(_, index) in scrollSnaps" :key="index">
<button :class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })" @click="scrollTo(index)" />
<button
:aria-label="`Go to slide ${index + 1}`"
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
@click="scrollTo(index)"
/>
</template>
</div>
</div>
Expand Down

0 comments on commit 03dd1eb

Please sign in to comment.