Skip to content

Commit

Permalink
trying out aria-current for active slide
Browse files Browse the repository at this point in the history
  • Loading branch information
mattaebersold committed Apr 10, 2024
1 parent 472768c commit 4cf56b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ssr-carousel-dots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
button.ssr-carousel-dot-button(
v-for='i in pages' :key='i'
:aria-label='makeLabel(i)'
:aria-disabled='isDisabled(i)'
:aria-current='isDisabled(i)'
@click='$emit("goto", i - 1)')

//- Custom dot
Expand Down Expand Up @@ -71,14 +71,14 @@ export default
margin-h 4px
// Show disabled state (aka, the active state)
[aria-disabled] > &
[aria-current] > &
opacity 1
background rgba(black, 0.7)
cursor default
// Make a simple hover
transition opacity 0.2s
:not([aria-disabled]) > &
:not([aria-current]) > &
opacity 0.5
+hover()
opacity 0.85
Expand Down

0 comments on commit 4cf56b0

Please sign in to comment.