Skip to content

Commit

Permalink
Merge pull request #5332 from DFE-Digital/CST-2748-a11y-initial-focus
Browse files Browse the repository at this point in the history
[CST-2748] Focus on the cookie banner before the skip to main content
  • Loading branch information
leoapost authored Nov 26, 2024
2 parents 00528e0 + c57a0d4 commit 53a4014
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 53a4014

Please sign in to comment.