Skip to content

Conversation

@5P5
Copy link
Contributor

@5P5 5P5 commented Jun 16, 2025

It is really hard to find some official HTML specs on this, so I did some more testing / trail & error to figure out what exactly those

other markup structures like images, other non-interactive text-level semantic elements, and more.

for a customizable select option element are.

Turns out, latest Firefox 140.0b8 does not even support their own MDN example of customizable select LOL 🤪
Only <hr/> as child works, all other "valid" elements are converted to just plain text content.

The new options Set is tested in Chromium / Google Chrome 137.0.7151.68 to work and not have errors for

Non-phrasing content used within an <option> element

The <option> element allows only non-interactive phrasing content, text, and <div> elements as its children. The semantics of non-phrasing content elements do not make sense as children of an <option>, and such semantics will largely be ignored by assistive technology since they are inappropriate in this context. Consider removing or changing such elements to one of the allowed phrasing content elements.

Anyways I propose to merge, as browser support will hopefully follow soon

Copy link

@johnnybenson johnnybenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, can we ship this?

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