Skip to content

Commit

Permalink
Add alert banner title to the hide button aria-label attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
danchamp committed Oct 4, 2021
1 parent ad7efe8 commit 111bc1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/localgov-alert-banner.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{{ content.title }}
</h2>
{% endif %}

<div class="localgov-alert-banner__body">
{{ content|without('title', 'link') }}
</div>
Expand All @@ -57,7 +57,7 @@
{% if not remove_hide_link %}
<div class="localgov-alert-banner__actions">
<div class="localgov-alert-banner__dismiss">
<button class="localgov-alert-banner__close js-localgov-alert-banner__close" aria-label="{{ 'Hide alert'|t }}">{{ 'Hide'|t }}</button>
<button class="localgov-alert-banner__close js-localgov-alert-banner__close" aria-label="{{ 'Hide alert'|t ~ ': ' ~ content.title|render|striptags|trim }}">{{ 'Hide'|t }}</button>
</div>
</div>
{% endif %}
Expand Down

0 comments on commit 111bc1a

Please sign in to comment.