diff --git a/web/src/components/HeroHeadline.vue b/web/src/components/HeroHeadline.vue index f0220d7..541cd5f 100644 --- a/web/src/components/HeroHeadline.vue +++ b/web/src/components/HeroHeadline.vue @@ -33,6 +33,11 @@ const segments = computed(() => const aboutOpen = ref(false) const noteButton = ref(null) + +function closeAbout() { + aboutOpen.value = false + noteButton.value?.focus() +} diff --git a/web/src/components/PanelMenu.vue b/web/src/components/PanelMenu.vue index fc72e10..9d405e7 100644 --- a/web/src/components/PanelMenu.vue +++ b/web/src/components/PanelMenu.vue @@ -21,7 +21,10 @@ function menuButtons(): HTMLButtonElement[] { } function onKeydown(event: KeyboardEvent) { - if (event.key === 'Escape') { + if (event.key === 'Escape' || event.key === 'Tab') { + // Tab closes like Esc instead of leaking focus behind the menu; the + // opener restores focus and the next Tab continues from there. + event.preventDefault() emit('close') return }