Skip to content

Commit

Permalink
Focus on the cookie banner before the skip to main content
Browse files Browse the repository at this point in the history
This ensures users can interact with important content
before navigating the rest of the page.
  • Loading branch information
leoapost committed Nov 26, 2024
1 parent fb81c13 commit c57a0d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/layouts/_application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<a href="#main-content" class="govuk-skip-link" tabindex="0">Skip to main content</a>

<% unless cookies[:cookie_consent_1] || current_page?(cookies_path) %>
<%= render "cookies/banner" %>
<% end %>

<a href="#main-content" class="govuk-skip-link" tabindex="0">Skip to main content</a>

<%= govuk_header(service_name:, container_classes: ("govuk-width-container__wide" if wide_container_view?)) do |header|
if user_signed_in?
header.with_navigation_item(text: "Sign out", href: destroy_user_session_path)
Expand Down

0 comments on commit c57a0d4

Please sign in to comment.