Skip to content

Commit 2d7018f

Browse files
committed
fix: πŸ› focus le premier lien lors de l'ouverture du breadcrumb
1 parent f4154d4 commit 2d7018f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

β€Žsrc/components/DsfrBreadcrumb/DsfrBreadcrumb.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ watch(expanded, (newValue, oldValue) => {
4242
:aria-label="navigationLabel"
4343
>
4444
<button
45-
v-show="!expanded"
45+
v-if="!expanded"
4646
class="fr-breadcrumb__button"
4747
:aria-expanded="expanded"
4848
:aria-controls="breadcrumbId"

β€Žsrc/composables/useCollapsable.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export const useCollapsable = () => {
5656
collapsing.value = false
5757
if (collapse.value && expanded === false) {
5858
collapse.value.style.removeProperty('--collapse-max-height')
59+
} else if (collapse.value) {
60+
collapse.value.querySelector('a')?.focus()
5961
}
6062
}
6163

0 commit comments

Comments
Β (0)