diff --git a/templates/elements/details.html.twig b/templates/elements/details.html.twig index 5ccb9c2eaa36a5571f7a1b67fa2d0a6a2aff6e64..74bc631f551fcc5106e0b68056d2a0b8436a3048 100644 --- a/templates/elements/details.html.twig +++ b/templates/elements/details.html.twig @@ -30,7 +30,11 @@ Prefix 'details' class to avoid collision with Modernizr. ] %} <summary{{ summary_attributes.addClass(summary_classes) }}> - <label{% if form_field_id %} for="{{ form_field_id }}"{% endif %}>{{ title }}</label> + {% if form_field_id %} + <label for="{{ form_field_id }}">{{ title }}</label> + {% else %} + <span>{{ title }}</span> + {% endif %} </summary> {%- endif -%} <div class="seven-details__wrapper details-wrapper">