Skip to content

Commit

Permalink
Move the skip link after the cookie banner
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Feb 6, 2024
1 parent 8e52c13 commit 733d8a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@
<%= javascript_tag nonce: true do -%>
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
<% end -%>
<%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>
<%= render "govuk_publishing_components/components/skip_link", {
href: "#content"
} %>

<%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>

<% unless omit_header %>
<% if show_explore_header %>
<% if homepage %>
Expand Down
6 changes: 6 additions & 0 deletions spec/components/layout_for_public_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,10 @@ def component_name
expect(meta.first["content"]).to match(%r{^https?://})
end
end

it "has the skip link immediately after the cookie banner" do
render_component({})

assert_select ".gem-c-cookie-banner + .gem-c-skip-link"
end
end

0 comments on commit 733d8a4

Please sign in to comment.