Skip to content
Snippets Groups Projects
Commit 452e8e65 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Merge branch 'feature/ISTWCMS-7312-kpaxman-fix_empty_block_a11y' into '1.1.x'

ISTWCMS-7312: only output the multi-type list when it has content, to avoid an a11y issue

See merge request !276
parents b11fb215 9b61577c
No related branches found
No related tags found
1 merge request!276ISTWCMS-7312: only output the multi-type list when it has content, to avoid an a11y issue
...@@ -3,107 +3,109 @@ ...@@ -3,107 +3,109 @@
{% set content_list = content_list|merge([type]) %} {% set content_list = content_list|merge([type]) %}
{% endfor %} {% endfor %}
{% set button_modifier_classes -%} {% if content_list %}
button button--large {{ modifier_classes }} {% set button_modifier_classes -%}
{%- endset %} button button--large {{ modifier_classes }}
{%- endset %}
{% embed '@components/tabs/_tabs.twig' with { {% embed '@components/tabs/_tabs.twig' with {
'tab_type': 'content', 'tab_type': 'content',
'content_list': content_list, 'content_list': content_list,
'button_modifier_classes': button_modifier_classes, 'button_modifier_classes': button_modifier_classes,
} %} } %}
{% if is_demo %} {% if is_demo %}
{% set view_all = 'true' %} {% set view_all = 'true' %}
{% endif %} {% endif %}
{% for type, list in lists %} {% for type, list in lists %}
{% for info in list %} {% for info in list %}
{% if loop.parent.loop.index == 1 %} {% if loop.parent.loop.index == 1 %}
{% block content_area_1 %} {% block content_area_1 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with { {% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type, 'type': type,
'lists': lists, 'lists': lists,
} %} } %}
{% if view_all %} {% if view_all %}
<div class="uw-multi-type-list__button"> <div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with { {% include '@components/button/button.twig' with {
'url': view_all[type].url, 'url': view_all[type].url,
'text': view_all[type].text, 'text': view_all[type].text,
} %} } %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% elseif loop.parent.loop.index == 2 %} {% elseif loop.parent.loop.index == 2 %}
{% block content_area_2 %} {% block content_area_2 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with { {% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type, 'type': type,
'lists': lists, 'lists': lists,
'view_all': view_all, 'view_all': view_all,
} %} } %}
{% if view_all %} {% if view_all %}
<div class="uw-multi-type-list__button"> <div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with { {% include '@components/button/button.twig' with {
'url': view_all[type].url, 'url': view_all[type].url,
'text': view_all[type].text, 'text': view_all[type].text,
} %} } %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% elseif loop.parent.loop.index == 3 %} {% elseif loop.parent.loop.index == 3 %}
{% block content_area_3 %} {% block content_area_3 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with { {% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type, 'type': type,
'lists': lists, 'lists': lists,
'view_all': view_all, 'view_all': view_all,
} %} } %}
{% if view_all %} {% if view_all %}
<div class="uw-multi-type-list__button"> <div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with { {% include '@components/button/button.twig' with {
'url': view_all[type].url, 'url': view_all[type].url,
'text': view_all[type].text, 'text': view_all[type].text,
} %} } %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% elseif loop.parent.loop.index == 4 %} {% elseif loop.parent.loop.index == 4 %}
{% block content_area_4 %} {% block content_area_4 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with { {% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type, 'type': type,
'lists': lists, 'lists': lists,
'view_all': view_all, 'view_all': view_all,
} %} } %}
{% if view_all %} {% if view_all %}
<div class="uw-multi-type-list__button"> <div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with { {% include '@components/button/button.twig' with {
'url': view_all[type].url, 'url': view_all[type].url,
'text': view_all[type].text, 'text': view_all[type].text,
} %} } %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% elseif loop.parent.loop.index == 5 %} {% elseif loop.parent.loop.index == 5 %}
{% block content_area_5 %} {% block content_area_5 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with { {% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type, 'type': type,
'lists': lists, 'lists': lists,
'view_all': view_all, 'view_all': view_all,
} %} } %}
{% if view_all %} {% if view_all %}
<div class="uw-multi-type-list__button"> <div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with { {% include '@components/button/button.twig' with {
'url': view_all[type].url, 'url': view_all[type].url,
'text': view_all[type].text, 'text': view_all[type].text,
} %} } %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endembed %} {% endembed %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment