Allow any element to be the child of a custom element (parser weirdness permitting) #10722
Labels
a11y-tracker
Group bringing to attention of a11y, or tracked by the a11y Group but not needing response.
document conformance
topic: custom elements
Relates to custom elements (as defined in DOM and HTML)
What problem are you trying to solve?
Certain elements, such as
<li>
or<option>
are only permitted within certain element types. Should this perhaps be expanded to custom elements? Many use cases where a custom element may reasonably want to slot these.What solutions exist today?
Currently they need to invent their own elements (e.g.
<sl-option>
) that provide no functionality, and just mirror the API of these.How would you solve it?
If there is no parser weirdness, allow any element to have a custom element as a parent. @annevk thought that sounds reasonable, with that caveat.
Anything else?
No need to do it all at once, it could be done one element at a time, starting from
<li>
and<option>
, which are the ones I most frequently needed to slot personally.The text was updated successfully, but these errors were encountered: