Skip to content

Commit 4b2657f

Browse files
committed
fix(a11y): link facet checkbox groups to category headings
1 parent 86eeb6a commit 4b2657f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/components/Compare/FacetSelector.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ function isCategoryNoneSelected(category: string): boolean {
4343
<div v-for="category in categoryOrder" :key="category">
4444
<!-- Category header with all/none buttons -->
4545
<div class="flex items-center gap-2 mb-2">
46-
<span class="text-3xs text-fg-subtle uppercase tracking-wider">
46+
<span
47+
:id="`facet-category-${category}-heading`"
48+
class="text-3xs text-fg-subtle uppercase tracking-wider"
49+
>
4750
{{ getCategoryLabel(category) }}
4851
</span>
4952
<!-- TODO: These should be radios, since they are mutually exclusive, and currently this behavior is faked with buttons -->
@@ -75,7 +78,7 @@ function isCategoryNoneSelected(category: string): boolean {
7578
<div
7679
class="flex items-center gap-1.5 flex-wrap"
7780
role="group"
78-
:aria-label="getCategoryLabel(category)"
81+
:aria-labelledby="`facet-category-${category}-heading`"
7982
>
8083
<label
8184
v-for="facet in facetsByCategory[category]"

0 commit comments

Comments
 (0)