fix(Carousel): add aria-current attribute to active dot (#4447)

Co-authored-by: Jakub <jakub.michalek@freelo.io>
This commit is contained in:
J-Michalek
2025-07-07 12:09:57 +02:00
committed by GitHub
parent 63730d684b
commit 1ba8a55bcb

View File

@@ -339,6 +339,7 @@ defineExpose({
:aria-label="t('carousel.goto', { slide: index + 1 })" :aria-label="t('carousel.goto', { slide: index + 1 })"
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })" :class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
:data-state="selectedIndex === index ? 'active' : undefined" :data-state="selectedIndex === index ? 'active' : undefined"
:aria-current="selectedIndex === index ? true : undefined"
@click="scrollTo(index)" @click="scrollTo(index)"
/> />
</template> </template>