Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297754

Allow tags details and summary in the help text instructions presented to the user below editing form field

$
0
0

Problem/Motivation

HTML tags details and summary currently cannot be used in the Help text instructions presented to the user below fields in the editing form.

To provide descriptive and human-friendly instructions to the content editors, listing specific examples can significantly improve the UX. However, providing more than 3-5 short-value examples takes up much of the UI and reduces usability. Similarly, providing links to some Help Topics documentation with examples requires the users to stop adding content and opening a new window (to avoid losing unsaved changes). Making use of standard details and summary HTML tags in the Help text would allow providing additional instruction details in a more user-friendly way by providing the relevant help information where it is needed the most, i.e. when adding the specific field content.

Steps to reproduce

The details and summary HTML tags do not get displayed in the instructions presented to the user below this field on the editing form."

Proposed resolution

Add details and summary HTML tags to the list of allowed tags in the FieldFilteredMarkup::allowedTags() (core/lib/Drupal/Core/Field/FieldFilteredMarkup.php)

/**
   * Returns the allowed tag list.
   *
   * @return string[]
   *   A list of allowed tags.
   */
  public static function allowedTags() {
    return ['a', 'b', 'big', 'code', 'del', 'em', 'i', 'ins', 'pre', 'q', 'small', 'span', 'strong', 'sub', 'sup', 'tt', 'ol', 'ul', 'li', 'p', 'br', 'img', 'details', 'summary'];
  }

Remaining tasks

Review patch.

User interface changes

Custom help text would display details and summary HTML tags to show expandable help text content.

Release notes snippet

Add details and summary HTML tags to the list of allowed tags in the FieldFilteredMarkup::allowedTags().


Viewing all articles
Browse latest Browse all 297754

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>