Skip to content

Commit 2d805c5

Browse files
authored
fix(a11y): use external link to focus main content (#1460)
1 parent 456daee commit 2d805c5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/app.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,9 @@ if (import.meta.client) {
121121
<template>
122122
<div class="min-h-screen flex flex-col bg-bg text-fg">
123123
<NuxtPwaAssets />
124-
<LinkBase
125-
:to="{ hash: '#main-content', query: route.query, params: route.params }"
126-
variant="button-primary"
127-
class="skip-link"
128-
>{{ $t('common.skip_link') }}</LinkBase
129-
>
124+
<LinkBase to="#main-content" external variant="button-primary" class="skip-link">{{
125+
$t('common.skip_link')
126+
}}</LinkBase>
130127

131128
<AppHeader :show-logo="!isHomepage" />
132129

app/components/Link/Base.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
7373
><slot
7474
/></span>
7575
<NuxtLink
76+
v-bind="props"
7677
v-else
7778
class="group/link gap-x-1 items-center"
7879
:class="{

0 commit comments

Comments
 (0)