#description_display broken for details elements

Created on 1 March 2015, about 10 years ago
Updated 29 May 2025, 2 days ago

Problem/Motivation

Following #description_display work defined for elements in issue : #314385: Make position of #description configurable via the API β†’ and what has been done more specifically for fieldsets here #2396145: Option #description_display for form element fieldset is not changing anything β†’ , this issue defines the same work to be done for details type element. Two issue found :

  1. The description id is wrong, currently details-description instead of $field_id . '--description as other elements.
  2. The description_display position is not taken into consideration.

Proposed resolution

Change template_preprocess_details() in form.inc to include accounting of #description_display element key. Also update the details.html.twig templates to use description_display setting.
NOTE: contrarily to fieldset, the description for details is before by default.

Remaining tasks



- Review patch and fix.

User interface changes

Description of details elements will now be positionned before or after details content depending of description_display.

API changes

None: #description_display should already be part of formAPI regarding #314385: Make position of #description configurable via the API β†’ .

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

forms system

Created by

πŸ‡«πŸ‡·France Dom.

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024