Skip to content

Commit

Permalink
Merge pull request #60 from MITLibraries/gdt-161-skip-links
Browse files Browse the repository at this point in the history
Allow custom skip link(s)
  • Loading branch information
jazairi authored Mar 26, 2024
2 parents ca56f70 + daa56df commit ba5bdc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ repo and make appropriate changes.
`app/views/layouts/_site_footer.html.erb` is also available if you really need
a third footer above the other two (I'm looking at you bento!).

`app/views/layouts/_skip_links.html.erb` provides the option to change the href or text for the skip link, or include
multiple skip links if needed.

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.

## Adding Additional JavaScript to HTML Head
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/_skip_links.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a id="skip" class="sr sr-focusable" href="#content-main">Skip to main content</a>
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= render partial: "layouts/head" %>
</head>
<body class="app-theme">
<a id="skip" class="skip sr sr-focusable" href="#content-main">Skip to main content</a>
<%= render partial: "layouts/skip_links" %>

<div class="wrap-page">

Expand Down

0 comments on commit ba5bdc9

Please sign in to comment.