From d4f86cf2ceb0759c515b3d2dd9fc951cae2952b0 Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Fri, 2 Feb 2024 08:59:44 -0500 Subject: [PATCH] ISTWCMS-6711: trying to fix label/title in details element --- templates/elements/details.html.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/elements/details.html.twig b/templates/elements/details.html.twig index 5ccb9c2e..74bc631f 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"> -- GitLab