- Merge request !47[#3552489] fix: Component subfield labels are duplicated when label display set to above → (Open) created by jcandan
When a component subfield of a Name element (e.g., Given, Family, Middle, etc.) has its
Label display setting set to title (aka above), the output contains nested <label> elements.
This happens because the Name module pre-renders a themed label and assigns the resulting HTML to #title; Drupal then renders another label for #title, resulting in two labels:
<label for="edit-field-surrogate-0-given" class="form-item__label">
<label class="form-item__label">Given</label>
</label>
Expected: One label per input, rendered by core per #title_display = 'before'.
Actual: Two labels (a label nested inside another label).
#title for the “title” (above) option.$element['#title_display'] = 'before'.$element['#required'] = $flag_required_input to control the HTML5 required / aria-required behavior, consistent with other branches.title_display modes (description/placeholder/none/attribute).title case.Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.