Skip to content

Commit a657927

Browse files
committed
fix: collapsible section title now toggles instead of scrolling (#1518, #1392)
1 parent ca144b1 commit a657927

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/components/CollapsibleSection.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,17 @@ useHead({
104104
/>
105105
</button>
106106

107-
<span>
108-
<LinkBase :to="`#${id}`">
109-
{{ title }}
110-
</LinkBase>
107+
<button
108+
type="button"
109+
class="text-start focus-visible:outline-accent/70 rounded"
110+
:aria-label="`${isOpen ? 'Collapse' : 'Expand'} ${title}`"
111+
@click="toggle"
112+
>
113+
{{ title }}
111114
<span v-if="subtitle" class="block text-2xs normal-case tracking-normal">{{
112115
subtitle
113116
}}</span>
114-
</span>
117+
</button>
115118
</component>
116119

117120
<!-- Actions slot for buttons or other elements -->

0 commit comments

Comments
 (0)