diff --git a/apps/web/app/components/GlobalHeader.vue b/apps/web/app/components/GlobalHeader.vue index 4fe68fe8..148510cb 100644 --- a/apps/web/app/components/GlobalHeader.vue +++ b/apps/web/app/components/GlobalHeader.vue @@ -17,6 +17,7 @@ const onSwitchLocale = () => { const { width } = useWindowSize() const { orientation } = useScreenOrientation() const shouldShowSpHeader = ref() +const dialogRef = ref() onMounted(() => { shouldShowSpHeader.value = width.value <= 1200 }) @@ -27,6 +28,11 @@ watch([width, orientation], () => { const showMenu = ref(false) const toggleMenu = () => { + if (showMenu.value) { + dialogRef.value!.close() + } else { + dialogRef.value!.show() + } showMenu.value = !showMenu.value } @@ -48,6 +54,9 @@ const getAnchorPath = computed( class="navigation-mobile-toggle" name="menu" :class="{ 'isOpened': showMenu }" + :aria-expanded="showMenu" + aria-controls="navigation-mobile-menu-trigger" + :aria-label="showMenu ? 'メニューを閉じる' : 'メニューを開く'" @click="toggleMenu" > @@ -55,19 +64,21 @@ const getAnchorPath = computed( - - - + +
    +
  • + + + + {{ link.text }} + +
  • +
+