Skip to content

Commit a7a4072

Browse files
committed
feat(a11y): Add a "Skip to main content" link
1 parent 90cd8f1 commit a7a4072

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

app/app.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template>
22
<div class="page">
3+
<a href="#maincontent" class="sr-only sr-only--focusable skip-link">Skip to main content</a>
34
<Navigation />
4-
<main>
5+
<main id="maincontent">
56
<NuxtLayout />
67
</main>
78
<SiteFooter />
@@ -38,4 +39,18 @@ useHead({
3839
}
3940
}
4041
}
42+
43+
.skip-link {
44+
display: block;
45+
position: fixed !important;
46+
top: 1rem;
47+
left: 1rem;
48+
z-index: 9999;
49+
padding: 0.5rem 1rem !important;
50+
background-color: var(--color-fg1);
51+
color: var(--color-accent);
52+
border-radius: 0.25rem;
53+
font-weight: 700;
54+
text-decoration: none;
55+
}
4156
</style>

0 commit comments

Comments
 (0)