Problem/Motivation
Field's help text allows html-tags. The list of allowed tags is hardcoded in core.
Currently allowed tags include:
<a> <b> <big> <code> <del> <em> <i> <ins> <pre> <q> <small> <span> <strong> <sub> <sup> <tt> <ol> <ul> <li> <p> <br> <img>
Issue #3353613: Allow tags details and summary in the help text instructions presented to the user below editing form field would allow also:
<details> <summary>
Some of the allowed tags (<big>) are deprecated in HTML5 and some of the others are often recommended to be avoided (<i>, <b>). Other tags may feel out of place in the context of a field's help text. Some may have accessibility implications, as the the help text is used as aria-describedby attribute for the field input as a string losing semantics.
Steps to reproduce
Edit a field in Field UI and check the list of allowed tags.

Proposed resolution
The list of allowed tags should be reviewed.
This is will result in a breaking change and should be implemented in the next major version.
Remaining tasks
Review the list of allowed tags.
Decide whether the allowed tags should be a setting instead of core code.
User interface changes
The tags are listed in the UI, so putting the recommended tag changes in this section.
Missing tags for help text include
WCAG 3.1.3 (AAA) Technique H40 recommended https://www.w3.org/WAI/WCAG22/Techniques/html/H40
<dl><dt><dd>
This should probably not be available for List (text) item labels
Details element, as per discussed at Accessibility office hours
<details><summary>
This should not be available for List (text) item labels
Removing tags not included in HTML5
<big>
Removing or marking tags that are not recommended to be used
<b><i>
Tags that are not HTML phrasing content
HTML5 pecification: "Most elements that are categorized as phrasing content can only contain elements that are themselves categorized as phrasing content, not any flow content."
https://www.w3.org/TR/2011/WD-html5-20110405/content-models.html#phrasin...
List (text) label is rendered inside <label> element.
The following should not be available for List (text) item labels, as they are flow content
<ol> <ul> <li> <p>
Adding tags that are similar to allowed tags
<svg> (since img is allowed)
Introduced terminology
API changes
Data model changes
The allowed tags between help text and field type "List (text)" should be separated lists. The scope may be wider even.
In "List (text)" the html may be inside a control element and thus not accessible where as in help text a wider range of html vvan be allowed.
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | List options.png | 13.22 KB | benjifisher |
| Screenshot 2025-12-19 at 10.53.00.png | 36.88 KB | simohell |
Comments
Comment #2
quietone commentedHi, in Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies. Thanks.
Comment #4
simohell commentedJust checked, that the allowed tags are in core the same for field's help and field type "List (text)" label. There should not be the same line of code. This needs quite a bit more thought, it seems.
Comment #5
kentr commentedAdded the accessibility tag to put it on the radar of contributors who search for that.
Comment #6
kentr commentedI think the first step is to make a list of the problematic tags.
For BC, they could initially remain as options but with a note that they are deprecated / not recommended.
Comment #7
simohell commentedI'm starting a preliminary list at the issue summary.
The list is incomplete, but is a starting point.
Comment #8
benjifisherUsability review
We discussed this issue at #3569220: Drupal Usability Meeting 2026-02-06. That issue will have a link to a recording of the meeting.
For the record, the attendees at the usability meeting were @benjifisher, @rkoller, @simohell, and @the_g_bomb. I have given then credit on this issue.
We have two recommendations:
<a>from the list of allowed tags for labels.The only usability issue we noticed is that a site builder might make the entire label a link, like "Terms of service" in this screenshot. If so, then clicking anywhere on the label triggers the link instead of selecting the list option.
On the other hand, there are use cases for including links, say to a page of terms and conditions. Furthermore, the site builder can avoid the usability concern by including additional text outside the link, like "Anything" in the screenshot. Even if the site builder does not do that, there are other ways to select the option: click on the checkbox/radio button (not on the label text), or use keyboard navigation.
I am not sure the second point counts as a usability issue, but we think there are valid uses for additional tags in help text.
If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #9
simohell commentedIt looks like HTML5 definition restricts tags for List (text) item labels by disallowing flow content. Paragraphs and html-lists are flow content. This supports imo strongly separate lists for the two use cases.
Comment #10
simohell commentedMDN recommends against a-tags inside label (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/lab...), but it does not seem to be a strict violation.