Make sure confirmation/danger banners have a H1

This makes errors on all pages have a `<h1>` element, which is important
for accessibility. It means a bit of rewriting the messages, but I think
they’re better for it.
This commit is contained in:
Chris Hill-Scott
2017-07-24 14:50:56 +01:00
parent 40e79c6827
commit befe93ec0b
4 changed files with 53 additions and 47 deletions

View File

@@ -7,7 +7,7 @@
{% endif %}
>
{% if subhead -%}
{{ subhead }}&ensp;
<h1 class="banner-title">{{ subhead }}</h1>
{%- endif -%}
{{ body }}
{% if delete_button %}

View File

@@ -29,6 +29,20 @@
</div>
{% endif %}
{% if template_delete_confirmation_message %}
<div class="bottom-gutter">
{% call banner_wrapper(type='dangerous', subhead=template_delete_confirmation_message[0]) %}
<p>
{{ template_delete_confirmation_message[1] }}
</p>
<form method='post'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button" name="delete" value="Confirm" />
</form>
{% endcall %}
</div>
{% endif %}
<h1 class="heading-large">{{ template.name }}</h1>
<div class="grid-row">