mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Fix duplicated H1 on ‘New letter branding’ page
For accessibility reasons a page should have one (and only one) H1. This commit fixes an instance where the H1 was duplicated as a result of the work done to componentize our page headings. It also adds an extra check to `client_request` so that we don’t introduce pages with multiple or no H1s in the future.
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
service_id,
|
||||
template_type,
|
||||
current_user,
|
||||
link_current_item=False
|
||||
link_current_item=False,
|
||||
root_element='h1'
|
||||
) %}
|
||||
<h1 class="heading-medium folder-heading">
|
||||
<{{ root_element }} class="heading-medium folder-heading">
|
||||
{% for folder in folders %}
|
||||
{% if loop.last and not link_current_item %}
|
||||
{% if folder.template_type or not folder.id %}
|
||||
@@ -26,7 +27,7 @@
|
||||
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</h1>
|
||||
</{{ root_element }}>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">{{ '{} letter branding'.format('Update' if is_update else 'Add')}}</h1>
|
||||
{{ page_header(
|
||||
'{} letter branding'.format('Update' if is_update else 'Add'),
|
||||
back_link=url_for('main.letter_branding')
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
<h1 class="heading-large">Choose a template</h1>
|
||||
{{ folder_path(template_folder_path, current_service.id, template_type, current_user) }}
|
||||
{{ folder_path(template_folder_path, current_service.id, template_type, current_user, root_element='h2') }}
|
||||
</div>
|
||||
|
||||
{% if not templates_and_folders.templates_to_show %}
|
||||
|
||||
Reference in New Issue
Block a user