form element description does not get description class if description display is set to before

Created on 16 September 2024, 3 months ago

Problem/Motivation

I am wondering why the description div does not get the class 'description' when used with description_display set to 'before', see form-element.html.twig

If description display 'after' or 'invisible' is used, the description class is instead added, see form-element.html.twig

This seems kind of inconsistent.

It's this

{% if description_display == 'before' and description.content %}
    <div{{ description.attributes }}>
      {{ description.content }}
    </div>

versus that

  {% if description_display in ['after', 'invisible'] and description.content %}
    <div{{ description.attributes.addClass(description_classes) }}>
      {{ description.content }}
    </div>
  {% endif %}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Active

Version

11.0 🔥

Component
Theme 

Last updated 13 minutes ago

Created by

🇩🇪Germany stefan.korn Jossgrund

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024