fix(a11y): add aria-* entries to interface settings (#2799)
Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
This commit is contained in:
parent
8697cc44e4
commit
6bb9ad0511
5 changed files with 67 additions and 61 deletions
|
@ -12,14 +12,16 @@ function updateTheme(theme: ThemeColors) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div flex="~ gap4 wrap" p2>
|
||||
<div flex="~ gap4 wrap" p2 role="group" aria-labelledby="interface-tc">
|
||||
<button
|
||||
v-for="[key, theme] in themes" :key="key"
|
||||
:style="{
|
||||
'background': key,
|
||||
'--local-ring-color': key,
|
||||
}"
|
||||
type="button"
|
||||
:class="currentTheme === theme['--theme-color-name'] ? 'ring-2' : 'scale-90'"
|
||||
:aria-pressed="currentTheme === theme['--theme-color-name'] ? 'true' : 'false'"
|
||||
:title="theme['--theme-color-name']"
|
||||
w-8 h-8 rounded-full transition-all
|
||||
ring="$local-ring-color offset-3 offset-$c-bg-base"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue