Skip to content

Commit 29974e5

Browse files
committed
fix(a11y): add aria-expanded and aria-controls to collapsible title button
1 parent d704602 commit 29974e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/components/CollapsibleSection.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ useHead({
106106
<button
107107
type="button"
108108
class="text-start focus-visible:outline-accent/70 rounded"
109-
:aria-label="`${isOpen ? 'Collapse' : 'Expand'} ${title}`"
109+
:aria-expanded="isOpen"
110+
:aria-controls="contentId"
111+
:aria-label="ariaLabel"
110112
@click="toggle"
111113
>
112114
{{ title }}

0 commit comments

Comments
 (0)