File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import autocomplete from './algolia'
23
23
import mapTable from './map-table'
24
24
import expando from './expando'
25
25
import codeCopy from './code-copy'
26
+ import skipNav from './skip-nav'
26
27
27
28
feedback ( )
28
29
accordion ( )
@@ -47,4 +48,5 @@ searchBar()
47
48
glightbox ( )
48
49
mapTable ( )
49
50
expando ( )
50
- codeCopy ( )
51
+ codeCopy ( )
52
+ skipNav ( )
Original file line number Diff line number Diff line change
1
+ const button =
2
+ document . createElement ( 'skiplink' ) ;
3
+ button . textContent = 'Skip to main content' ;
4
+
5
+ button . addEventListener ( 'focus-visible' , => {
6
+ button. style . display = 'inline-block' ;
7
+ } ) ;
8
+
9
+ button . addEventListener ( 'focus-invisible' , => {
10
+ button. style . display = 'none' ;
11
+ } ) ;
12
+
Original file line number Diff line number Diff line change 80
80
< link rel ="stylesheet " href ="{{ '/assets/algolia.css' | relative_url }} ">
81
81
</ head >
82
82
< body >
83
+ < a href ="#breadcrumbs__link " class ="skiplink "> Skip to main content</ a >
83
84
< div id ="consent-manager "> </ div >
84
85
{{ content }}
85
86
< a class ="back-scrolling " data-back-scrolling data-active-class ="back-scrolling--active ">
Original file line number Diff line number Diff line change
1
+ .skiplink {
2
+ position : absolute ;
3
+ left : -1000px ;
4
+ top : auto ;
5
+ height : 1px ;
6
+ width : 1px ;
7
+ overflow : hidden ;
8
+ display : block ;
9
+ z-index : 999 ;
10
+ }
11
+ .skiplink :focus-visible {
12
+ background : color (gray-700 )
13
+ padding : 2px ;
14
+ color : color (secondary );
15
+ position : static ;
16
+ width : 200px ;
17
+ height : auto ;
18
+ overflow : visible ;
19
+ }
You can’t perform that action at this time.
0 commit comments