Skip to content

Commit 5f36b73

Browse files
committed
♿️ Added jump to main content button
1 parent 3c8a6db commit 5f36b73

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/App.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script>
2+
import GoToMainContent from './components/GoToMainContent.svelte';
23
import Navbar from './components/Navbar.svelte'
34
import Header from './components/Header.svelte'
45
import Footer from './components/Footer.svelte'
@@ -7,9 +8,10 @@
78
import Textarea from './components/Textarea.svelte'
89
</script>
910

11+
<GoToMainContent />
1012
<Navbar />
1113
<Header />
12-
<main class="d-flex flex-column justify-content-center align-items-center px-2 px-sm-5">
14+
<main id="mainContent" class="d-flex flex-column justify-content-center align-items-center px-2 px-sm-5">
1315
<Settings />
1416
<Textarea />
1517
<FileDropzone />

src/components/GoToMainContent.svelte

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<a
2+
href="#mainContent"
3+
class="position-absolute top-0 start-0 btn btn-outline-secondary bg-light text-primary m-2 visually-hidden-focusable"
4+
>
5+
Go to main content
6+
</a>
7+
8+
<style>
9+
a {
10+
z-index: 5;
11+
}
12+
</style>

0 commit comments

Comments
 (0)