vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

perf(a11y): add aria-checked attribute to switch

Open kecrily opened this issue 3 years ago • 2 comments

Use the dark switch provided by vueuse and add the aria-checked attribute to the switch

kecrily avatar May 23 '22 11:05 kecrily

Thanks for the pr!

@yyx990803 Do you remember why we stop using Vueuse for Dark mode control? I remember initially, we're using Vueuse dark mode feature, and then we swtiched to creating the original one in Vue.js website.

Was it due to trying to reduce dependencies? If so, we're already using Vueuse for useMediaQuery so maybe we could reuse Vueuse for the dark theme as well? 🤔

kiaking avatar May 23 '22 13:05 kiaking

@kecrily OK, let's not use vueuse for now. We can simply apply the aria label with current useAppearance function. Would you mind updating the code 👀

kiaking avatar May 30 '22 06:05 kiaking