Allow HTML content with rules as for LI tag to OPTION tag #9859
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
Many JavaScript libraries has been created because controls hard to style according to site theme or design system. This is especially prominent for OPTION tag that is used by SELECT and DATALIST tags.
Sites that try to use raw controls and avoid JavaScript, can not reach expected behavior for select tag and other option usages, if just simple string like name is not enough to make an informed choice or describe items in the list offered via the select tag or in the input with data list.
What solutions exist today?
Today all solutions involve usage of complicated (and often buggy) JavaScript libraries which often are not provide proper metadata for accessibility/assistive technologies and screen readers.
How would you solve it?
Allow for OPTION contents (children tags and text nodes) same rules for allowed children tags and styling features that are applied today to content of LI tag, except
list-style
CSS property (or use different defaults for this, such asnone
) for the OPTION tag.Anything else?
Examples where it can be useful for no-javascript sites:
This will allow wider usage of more accessible select tag and input+datalist pairs across websites and improve experience of users who need screen reader, as these controls more obvious for them, also, will make such experience more obvious for mobile context.
The text was updated successfully, but these errors were encountered: