Skip to content

[6.x] Fix raw markup in tooltips and labels of HTML combobox options - #15915

Merged
jackmcdade merged 1 commit into
statamic:6.xfrom
jasonbaciulis:fix/combobox-label-html-plain-text
Nov 16, 2026
Merged

jackmcdade merged 1 commit into
statamic:6.xfrom
jasonbaciulis:fix/combobox-label-html-plain-text

Conversation

@jasonbaciulis

@jasonbaciulis jasonbaciulis commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

The new "Preview Aspect Ratio" select in the Assets fieldtype config shows raw markup in its option tooltips.

tooltip

With label_html, getOptionLabel() returns the HTML label everywhere, including places that only take text: the option title, the text-value used for typeahead, the remove button's aria-label, and a few more. This affects every label_html select, and the Dictionary fieldtype.

devtools

This adds getOptionPlainLabel(), which returns the label's text content, and uses it in those places. It's also passed to the selected-options slot so the Dictionary fieldtype can use it.

Browser tests cover the option title/textvalue and the remove button aria-label. Both fail without the change.

@jasonbaciulis
jasonbaciulis marked this pull request as ready for review November 16, 2026 10:37
@jasonbaciulis jasonbaciulis changed the title [6.x] Use plain text for HTML combobox labels in attributes [6.x] Fix raw markup in tooltips and labels of HTML combobox options Nov 16, 2026
@jackmcdade
jackmcdade merged commit 370095f into statamic:6.x Nov 16, 2026
65 of 66 checks passed
@jackmcdade

Copy link
Copy Markdown
Member

Nice catch, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants