From 935f9c45855c409d477ea3dd4084c7857715fb4e Mon Sep 17 00:00:00 2001 From: planctus Date: Tue, 5 May 2020 12:06:35 +0200 Subject: [PATCH] fix(card): Adding checks on props - FRONT-1138 --- src/ec/packages/ec-component-card/ecl-card.html.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ec/packages/ec-component-card/ecl-card.html.twig b/src/ec/packages/ec-component-card/ecl-card.html.twig index 33a6e8258..5b3d8f98f 100644 --- a/src/ec/packages/ec-component-card/ecl-card.html.twig +++ b/src/ec/packages/ec-component-card/ecl-card.html.twig @@ -80,8 +80,9 @@
- {% if _card.image.src %} - + {% if _card.image.src is defined and _card.image.src is not empty %} + {% set _card_img_aria_label = _card.image.alt is defined and _card.image.alt is not empty ? 'aria-label="' ~ _card.image.alt ~ '"' : '' %} + {% endif %} {% if _card.meta is not empty %}
{{ _card.meta|join(" | ") }}