-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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?
Changes from 2 commits
088b919
16fadde
3c57a19
e27ea83
44225a8
c7deb50
e4d071c
fb7ca7a
841e6ff
c6c208c
0891d73
787e86f
bfa1c18
a4954ad
15f67ea
93ebe9e
b6cebc4
ced6411
57dced1
eb42bf6
22b839c
f40e975
19c1c04
aa9436e
eab0bc6
7f9cc16
bed729f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12785,6 +12785,34 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E% | |||||||||
</ul> | ||||||||||
|
||||||||||
|
||||||||||
<h6>Select element inner content elements</h6> | ||||||||||
|
||||||||||
<p><dfn>Select element inner content elements</dfn> are <code>option</code> elements and other | ||||||||||
elements which are used to group and decorate them with a <code>select</code> element.</p> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reads weird. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I re-wrote it like this: ... are the elements which are allowed as descendants of select elements. |
||||||||||
|
||||||||||
<p>The following are <span>select element inner content elements</span>:</p> | ||||||||||
|
||||||||||
<ul class="brief category-list"> | ||||||||||
<li><code>option</code> elements.</li> | ||||||||||
|
||||||||||
<li><code>optgroup</code> elements.</li> | ||||||||||
|
||||||||||
<li><code>hr</code> elements.</li> | ||||||||||
|
||||||||||
<li><span>script-supporting elements</span>.</li> | ||||||||||
|
||||||||||
<li><code>noscript</code> elements.</li> | ||||||||||
|
||||||||||
<li><code>div</code> elements.</li> | ||||||||||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
<li><code>span</code> elements.</li> | ||||||||||
|
||||||||||
<li><code>img</code> elements.</li> | ||||||||||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
<li><span>SVG <code>svg</code></span> elements.</li> | ||||||||||
</ul> | ||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
<h5>Transparent content models</h5> | ||||||||||
|
||||||||||
|
@@ -53203,7 +53231,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> { | |||||||||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||||||||||
<dd>Where <span>phrasing content</span> is expected.</dd> | ||||||||||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||||||||||
<dd>Zero or more <code>option</code>, <code>optgroup</code>, <code>hr</code>, and <span data-x="script-supporting elements">script-supporting</span> elements.</dd> | ||||||||||
<dd>Zero or more <span>select element inner content elements</span>.</dd> | ||||||||||
<dd>Zero or one child <code>button</code>.</dd> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The button should probably go first, and I wanted to keep the "zero or one" concept with the button, so I wrote it like this:
Look good? |
||||||||||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||||||||||
<dd><span>Global attributes</span></dd> | ||||||||||
<dd><code data-x="attr-fe-autocomplete">autocomplete</code></dd> | ||||||||||
|
@@ -53932,9 +53961,10 @@ interface <dfn interface>HTMLDataListElement</dfn> : <span>HTMLElement</span> { | |||||||||
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||||||||||
<dd>None.</dd> | ||||||||||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||||||||||
<dd>As a child of a <code>select</code> element.</dd> | ||||||||||
<dd>As a descendant of a <code>select</code> element.</dd> | ||||||||||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||||||||||
<dd>Zero or more <code>option</code> and <span data-x="script-supporting elements">script-supporting</span> elements.</dd> | ||||||||||
<dd>Zero or more <span>select element inner content elements</span>.</dd> | ||||||||||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<dd>Zero or one <code>legend</code> elements.</dd> | ||||||||||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||||||||||
<dd><span>Global attributes</span></dd> | ||||||||||
<dd><code data-x="attr-optgroup-disabled">disabled</code></dd> | ||||||||||
|
@@ -54029,17 +54059,15 @@ interface <dfn interface>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> { | |||||||||
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||||||||||
<dd>None.</dd> | ||||||||||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||||||||||
<dd>As a child of a <code>select</code> element.</dd> | ||||||||||
<dd>As a descendant of a <code>select</code> element.</dd> | ||||||||||
<dd>As a child of a <code>datalist</code> element.</dd> | ||||||||||
<dd>As a child of an <code>optgroup</code> element.</dd> | ||||||||||
<dd>As a descendant of an <code>optgroup</code> element.</dd> | ||||||||||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||||||||||
<dd>If the element has a <code data-x="attr-option-label">label</code> attribute and a <code data-x="attr-option-value">value</code> attribute: <span data-x="concept-content-nothing">Nothing</span>.</dd> | ||||||||||
<dd>If the element has a <code data-x="attr-option-label">label</code> attribute but no <code data-x="attr-option-value">value</code> attribute: <span data-x="text content">Text</span>.</dd> | ||||||||||
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is not a | ||||||||||
child of a <code>datalist</code> element: <span data-x="text content">Text</span> that is not | ||||||||||
<span>inter-element whitespace</span>.</dd> | ||||||||||
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is a child | ||||||||||
of a <code>datalist</code> element: <span data-x="text content">Text</span>.</dd> | ||||||||||
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute: <span>Text content</span> and zero or more <code>div</code>, <code>span</code>, <code>noscript</code>, <code>img</code>, <span>SVG <code>svg</code></span>, and <span data-x="script-supporting elements">script-supporting</span> elements.</dd> | ||||||||||
<dd><div class="note">If an <code>img</code> is used within an <code>option</code> and there is no other text within the <code>option</code>, then the <code>option</code> won't have an accessible name unless the <code>img</code> also has a non-empty <code data-x="attr-img-alt">alt</code> attribute.</div></dd> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't have notes in the "element" box, put it further down along with the prose about the content model. The note is also not correct, so maybe it's better to remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought this was what @scottaohara suggested, but as per this comment, it sounds like we can add notes and examples as a follow up. I removed the note for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. besides the placement could you elaborate on what was wrong with the note @zcorpan? i might have phrased it a bit differently, but it seemed to be saying |
||||||||||
|
||||||||||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||||||||||
<dd><span>Global attributes</span></dd> | ||||||||||
<dd><code data-x="attr-option-disabled">disabled</code></dd> | ||||||||||
|
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.
I think it's rather confusing to have both
select
element and "Select element".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.
I'm not sure if I should reference
<code>select</code>
in the<dfn>
for this concept, and I didn't make all of the references to it do that either.Should I do that instead? Or are there other places where I'm using
<code>select</code>
that should just be "select"?