Skip to content

Commit ba5bdc9

Browse files
authored
Merge pull request #60 from MITLibraries/gdt-161-skip-links
Allow custom skip link(s)
2 parents ca56f70 + daa56df commit ba5bdc9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ repo and make appropriate changes.
5858
`app/views/layouts/_site_footer.html.erb` is also available if you really need
5959
a third footer above the other two (I'm looking at you bento!).
6060

61+
`app/views/layouts/_skip_links.html.erb` provides the option to change the href or text for the skip link, or include
62+
multiple skip links if needed.
63+
6164
If you need to make changes to other templates, you can also copy those to your local repo but you should check with others as the main header / footer / etc are probably best left as they are in this gem.
6265

6366
## Adding Additional JavaScript to HTML Head
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a id="skip" class="sr sr-focusable" href="#content-main">Skip to main content</a>

app/views/layouts/application.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<%= render partial: "layouts/head" %>
55
</head>
66
<body class="app-theme">
7-
<a id="skip" class="skip sr sr-focusable" href="#content-main">Skip to main content</a>
7+
<%= render partial: "layouts/skip_links" %>
88

99
<div class="wrap-page">
1010

0 commit comments

Comments
 (0)