-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update content model for customizable select #10586
base: main
Are you sure you want to change the base?
Conversation
This PR updated the content model for the <select>, <option>, and <optgroup> elements in support of customizable <select>. Fixes whatwg#10317
20549ca
to
088b919
Compare
Is the idea to allow If the former, you need to change the definition of phrasing content to include " If the latter, you need to change the content model if |
h1 elements are not supposed to be part of the content model, so I implemented the div and span switching by pulling out the content models for option and optgroup and using them in div and span. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use some examples. Or are we adding those as part of another PR?
In regards to the updated content model for the select element and its allowed children, an `optgroup` can have a `legend` element as its first child, and this `legend` needs to be able to name the `optgroup` similarly to how a `legend` names a `fieldset`. see: whatwg/html#10586
I started a follow up here: https://github.com/whatwg/html/compare/main...josepharhar:html:selectexamples?expand=1 |
thanks @josepharhar - give me a shout when these are finished, and i can help review and/or add on as need be. |
In order to resolve the remaining two open comment threads, I added notes about the content model:
I originally had notes about the content model which were placed directly after the content model itself, but I was told not to do that and to put the notes where the prose about the content model is. I'm not sure where such prose exists, so I just added the notes to the very end of the option element and select element sections: #10586 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like everything has been addressed with this PR for a bit now. The contents look good to me, thanks for resolving the last two bits in #10586 (comment) @josepharhar and adding more detail to the commit message in the OP.
I'll plan on merging this towards the end of next week, provided the one nit I found gets resolved and there are no further substantial reviews.
<code data-x="">" "</code>, the value of <span>descendant</span>'s <code | ||
data-x="attr-img-alt">alt</code> attribute, and <code data-x="">" "</code>.</p></li> | ||
|
||
<li><p><span>Continue</span> skipping all <span data-x="descendant">>descendants</span> of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li><p><span>Continue</span> skipping all <span data-x="descendant">>descendants</span> of | |
<li><p><span>Continue</span> skipping all <span data-x="descendant">descendants</span> of |
This PR updates the content model for the
<select>
,<option>
, and<optgroup>
elements in support of customizable<select>
.The major additions are:
<select>
and<optgroup>
can contain<div>
elements.<option>
elements can contain<div>
and non-interactive phrasing content.<optgroup>
can have a child<legend>
to represent its label.Fixes #10317
(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/form-elements.html ( diff )
/grouping-content.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/rendering.html ( diff )
/scripting.html ( diff )
/text-level-semantics.html ( diff )