Skip to content

Commit 0e6b766

Browse files
committed
fix: element that use autofocus
1 parent e6aedfd commit 0e6b766

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/web/app/components/GlobalHeader.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,21 @@ const getAnchorPath = computed(
6464
<!-- <VFIcon name="menu" color="vue-blue" can-hover @click="toggleMenu" /> -->
6565
</div>
6666
<!-- hamburger-menu -->
67-
<!-- eslint-disable vuejs-accessibility/no-autofocus -->
6867
<dialog
6968
id="navigation-mobile-menu-trigger"
7069
ref="dialogRef"
71-
autofocus
7270
aria-label="ハンバーガーメニュー"
7371
class="navigation-mobile-menu"
7472
>
75-
<!-- eslint-enable vuejs-accessibility/no-autofocus -->
7673
<ul>
77-
<li v-for="link in navLinks" :key="link.anchor">
78-
<nuxt-link :to="getAnchorPath(link.anchor)" @click="toggleMenu">
74+
<li v-for="(link, index) in navLinks" :key="link.anchor">
75+
<!-- eslint-disable vuejs-accessibility/no-autofocus -->
76+
<nuxt-link
77+
:to="getAnchorPath(link.anchor)"
78+
:autofocus="index === 0 && true"
79+
@click="toggleMenu"
80+
>
81+
<!-- eslint-enable vuejs-accessibility/no-autofocus -->
7982
<VFTypography variant="heading/200" color="vue-blue">{{ link.text }}</VFTypography>
8083
</nuxt-link>
8184
</li>

0 commit comments

Comments
 (0)