mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-21 20:03:18 -06:00
Add "Skip to main content" tab-focusable button
- https://webaim.org/techniques/skipnav/ - https://css-tricks.com/how-to-create-a-skip-to-content-link/
This commit is contained in:
parent
0e930f7ae1
commit
12c6efc0fe
@ -378,6 +378,22 @@ h1 svg.icon {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Skip to main content {{{ */
|
||||
#skip-to-main {
|
||||
position: absolute;
|
||||
padding: 8px;
|
||||
background-color: var(--text-0);
|
||||
color: var(--background-0);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
#skip-to-main:focus {
|
||||
transform: translateY(0%);
|
||||
}
|
||||
#main-content:target {
|
||||
animation: none; /* prevent it from turning yellow */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Breadcrumb navigation {{{ */
|
||||
|
||||
.breadcrumb {
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
<body>
|
||||
<a id="top" aria-hidden="true"></a>
|
||||
<a id="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
|
||||
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
|
||||
{{ partial "icon.html" "chevron-up" }}
|
||||
@ -24,7 +25,7 @@
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<main>
|
||||
<main id="main-content">
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user