Skip to content

Allow custom skip link(s) #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading