vitepress
vitepress copied to clipboard
perf(a11y): add aria-checked attribute to switch
Use the dark switch provided by vueuse and add the aria-checked attribute to the switch
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? 🤔
@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 👀