From 9451531bc66be10486b37fe838674167d953afdd Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Tue, 18 Aug 2020 11:19:07 +0100 Subject: [PATCH] Fix first skip to contents link It was invisible at all times. Now it is visible when selected. This will help keyboard users take advantage of it. --- app/templates/views/check/ok.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/templates/views/check/ok.html b/app/templates/views/check/ok.html index 7554f18c0..a2fe13ab2 100644 --- a/app/templates/views/check/ok.html +++ b/app/templates/views/check/ok.html @@ -5,13 +5,9 @@ {% from "components/page-header.html" import page_header %} {% from "components/message-count-label.html" import message_count_label %} {% from "components/button/macro.njk" import govukButton %} +{% from "components/skip-link/macro.njk" import govukSkipLink %} {% set file_contents_header_id = 'file-preview' %} -{% macro skip_to_file_contents() %} -

- Skip to file contents -

-{% endmacro %} {% block service_page_title %} {{ "Preview of {}".format(template.name) }} @@ -30,7 +26,10 @@ {% endcall %} {% endif %} - {{ skip_to_file_contents() }} + {{ govukSkipLink({ + "text": "Skip to file contents", + "href": "#" + file_contents_header_id + }) }} {{ template|string }}