From 4cf56b00f692242c5a15a8b2330254dfabafdd81 Mon Sep 17 00:00:00 2001 From: Matthew Aebersold Date: Wed, 10 Apr 2024 13:02:19 -0700 Subject: [PATCH] trying out aria-current for active slide --- src/ssr-carousel-dots.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ssr-carousel-dots.vue b/src/ssr-carousel-dots.vue index 550471d..1f17026 100644 --- a/src/ssr-carousel-dots.vue +++ b/src/ssr-carousel-dots.vue @@ -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 @@ -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