Skip to content

Commit c24d1c8

Browse files
committed
fix: a11y tweaks
1 parent a17c86d commit c24d1c8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/components/AccentColorPicker.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
55
</script>
66

77
<template>
8-
<div class="flex items-center justify-between">
8+
<div role="listbox" aria-label="Accent colors" class="flex items-center justify-between">
99
<button
1010
v-for="color in accentColors"
1111
:key="color.id"
1212
type="button"
1313
role="option"
1414
:aria-selected="selectedAccentColor === color.id"
1515
:aria-label="color.name"
16-
class="size-6 rounded-full transition-transform duration-150 hover:scale-110 focus-ring aria-selected:(ring-2 ring-fg ring-offset-2 ring-offset-bg-subtle)"
16+
class="size-6 rounded-full transition-transform duration-150 motion-safe:hover:scale-110 focus-ring aria-selected:(ring-2 ring-fg ring-offset-2 ring-offset-bg-subtle)"
1717
:style="{ backgroundColor: color.value }"
1818
@click="setAccentColor(color.id)"
1919
/>
2020
<button
2121
type="button"
2222
aria-label="Clear accent color"
23-
class="size-6 rounded-full transition-transform duration-150 hover:scale-110 focus-ring flex items-center justify-center bg-accent-fallback"
23+
class="size-6 rounded-full transition-transform duration-150 motion-safe:hover:scale-110 focus-ring flex items-center justify-center bg-accent-fallback"
2424
@click="setAccentColor(null)"
2525
>
26-
<span class="i-carbon-error size-4 text-bg" />
26+
<span class="i-carbon-error size-4 text-bg" aria-hidden="true" />
2727
</button>
2828
</div>
2929
</template>

0 commit comments

Comments
 (0)