-
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
This CL adds checks for attributes tabindex and contenteditable of <option> descendants. Tests are introduced to verify behavior. Checks based on whatwg/html#10586 Part 3 based on https://chromium-review.googlesource.com/c/chromium/src/+/5906182 Bug: 347890366 Change-Id: Ie4e4e7b655aeacc9d7e95067d17172c7869aa003 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6044294 Commit-Queue: Ana Sollano Kim <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1387905}
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) |
This PR updates the content model for the
<select>
,<option>
, and<optgroup>
elements in support of customizable<select>
.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 )