Merge pull request #3582 from alphagov/fix-skiplink

Fix or remove skip links on bulk send and contact list upload pages
This commit is contained in:
Pea M. Tyczynska
2020-08-20 10:23:36 +01:00
committed by GitHub
9 changed files with 41 additions and 124 deletions

View File

@@ -6,13 +6,6 @@
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/message-count-label.html" import message_count_label %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
Error
{% endblock %}
@@ -135,8 +128,6 @@
{% endif %}
{{ skip_to_file_contents() }}
{% endcall %}
</div>
@@ -158,7 +149,7 @@
{% set column_headers = recipients._raw_column_headers if recipients.duplicate_recipient_column_headers else recipients.column_headers %}
<h2 class="heading-medium" id="{{ file_contents_header_id }}">{{ original_file_name }}</h2>
<h2 class="heading-medium" id="file-preview">{{ original_file_name }}</h2>
<div class="fullscreen-content" data-module="fullscreen-table">
{% call(item, row_number) list_table(

View File

@@ -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() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% 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 }}
<div class="bottom-gutter-3-2">

View File

@@ -6,13 +6,6 @@
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/message-count-label.html" import message_count_label %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
Error
{% endblock %}
@@ -43,7 +36,6 @@
{% endfor %}
</ul>
{% endif %}
{{ skip_to_file_contents() }}
{% endcall %}
</div>
@@ -60,7 +52,7 @@
<div class="fullscreen-content" data-module="fullscreen-table">
{% call(item, row_number) mapping_table(
caption=original_file_name,
caption="Errors in " + original_file_name,
caption_visible=False,
field_headings=[
'<span class="govuk-visually-hidden">Row in file</span><span aria-hidden="true" class="table-field-invisible-error">1</span>'|safe

View File

@@ -6,13 +6,6 @@
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/message-count-label.html" import message_count_label, recipient_count_label %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
Error
{% endblock %}
@@ -48,9 +41,6 @@
</p>
{% endif %}
{{ skip_to_file_contents() }}
{% endcall %}
</div>
@@ -66,7 +56,7 @@
<a href="#content" class="govuk-link govuk-link--no-visited-state back-to-top-link">Back to top</a>
</div>
<h2 class="heading-medium" id="{{ file_contents_header_id }}">{{ original_file_name }}</h2>
<h2 class="heading-medium" id="file-preview">{{ original_file_name }}</h2>
{% call(item, row_number) list_table(
recipients.displayed_rows,

View File

@@ -6,13 +6,6 @@
{% from "components/message-count-label.html" import message_count_label, recipient_count_label %}
{% from "components/button/macro.njk" import govukButton %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
{{ original_file_name }}
{% endblock %}

View File

@@ -6,12 +6,6 @@
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/message-count-label.html" import message_count_label %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
Error
@@ -43,7 +37,6 @@
{% endfor %}
</ul>
{% endif %}
{{ skip_to_file_contents() }}
{% endcall %}
</div>

View File

@@ -6,12 +6,6 @@
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/message-count-label.html" import message_count_label %}
{% set file_contents_header_id = 'file-preview' %}
{% macro skip_to_file_contents() %}
<p class="govuk-visually-hidden">
<a class="govuk-link govuk-link--no-visited-state" href="#{{ file_contents_header_id }}">Skip to file contents</a>
</p>
{% endmacro %}
{% block service_page_title %}
Error
@@ -56,9 +50,6 @@
</p>
{% endif %}
{{ skip_to_file_contents() }}
{% endcall %}
</div>
@@ -76,7 +67,7 @@
{% set column_headers = recipients._raw_column_headers if recipients.duplicate_recipient_column_headers else recipients.column_headers %}
<h2 class="heading-medium" id="{{ file_contents_header_id }}">{{ original_file_name }}</h2>
<h2 class="heading-medium" id="file-preview">{{ original_file_name }}</h2>
<div class="fullscreen-content" data-module="fullscreen-table">
{% call(item, row_number) list_table(