Skip to content

Commit

Permalink
Merge pull request #620 from localgovdrupal/fix/612/alt-text-service-…
Browse files Browse the repository at this point in the history
…map-field

Add alt text to announce map link opens in a new tab
  • Loading branch information
markconroy authored Sep 24, 2024
2 parents 77a749e + 1c66e02 commit aa313c9
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions templates/content/node--localgov-services-landing--full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ attach_library('localgov_base/service-landing-page') }}
{% endif %}

{#
{#
Set icon names here, so we can override them in subthemes by calling
'include @localgov_base/content/-node--localgov-services-landing--full.twig with {
facebook_icon = 'facebook-f',
Expand All @@ -23,11 +23,6 @@
{% set website_icon = 'globe' %}
{% set map_icon = 'map-marker-alt' %}

{#
For shorthand, let's abbreviate our classes from .service-landing-page to
.service-landing-page
#}

{%
set classes = [
'service-landing-page',
Expand Down Expand Up @@ -67,21 +62,21 @@
{# Begin Grid Main Column #}
<div class="lgd-row__two-thirds">

{% if
node.localgov_email_address.value
or node.localgov_address.value
or node.localgov_opening_hours.value
or node.localgov_phone.value
or node.localgov_facebook.value
or node.localgov_twitter.value
or node.localgov_hearing_difficulties_phone.value
{% if
node.localgov_email_address.value
or node.localgov_address.value
or node.localgov_opening_hours.value
or node.localgov_phone.value
or node.localgov_facebook.value
or node.localgov_twitter.value
or node.localgov_hearing_difficulties_phone.value
%}
{# Begin Contact Section #}
<div class="service-landing-page__contact">
{% if node.localgov_email_address.value
or node.localgov_address.value
or node.localgov_opening_hours.value
or node.localgov_phone.value
{% if node.localgov_email_address.value
or node.localgov_address.value
or node.localgov_opening_hours.value
or node.localgov_phone.value
%}
<h2>{{ 'Contact this service'|t }}</h2>
{# Begin Contact Containers #}
Expand Down Expand Up @@ -113,7 +108,7 @@
{{ content.localgov_phone|render|striptags }}
</li>
{% endif %}

{% if node.localgov_contact_us_online.value %}
<li class="service-landing-page__contact-list-item">
{% include "@localgov_base/includes/icons/icon.html.twig" with {
Expand All @@ -126,7 +121,7 @@
<a href="{{ node.localgov_contact_us_online.value }}">{{ node.localgov_contact_us_online.value }}</a>
</li>
{% endif %}

{% if node.localgov_other_team_contacts.value %}
<li class="service-landing-page__contact-list-item">
{% include "@localgov_base/includes/icons/icon.html.twig" with {
Expand Down Expand Up @@ -168,7 +163,10 @@
}
%}
<div>
<a href="{{ content.localgov_link_to_map|render|striptags }}" class="external-link" target="_blank">{{ 'View map'|t }}</a>
<a href="{{ content.localgov_link_to_map|render|striptags }}" class="external-link" target="_blank">
{{ 'View map'|t }}
<span class="visually-hidden">{{ 'External site, opens in a new tab'|t }}</span>
</a>
</div>
</div>
{% endif %}
Expand Down Expand Up @@ -224,7 +222,7 @@
{% endif %}
{# End Contact Socials and a11y number #}

</div>
</div>
{% endif %}
{# End Contact Section #}

Expand Down

0 comments on commit aa313c9

Please sign in to comment.