-
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 14 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
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,68 @@ 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
|
||
</ul> | ||
|
||
<h6>Optgroup element inner content elements</h6> | ||
|
||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p><dfn>Optgroup element inner content elements</dfn> are the elements which are allowed as | ||
descendants of <code>optgroup</code> elements.</p> | ||
|
||
<p>The following are <span>optgroup element inner content elements</span>:</p> | ||
|
||
<ul class="brief category-list"> | ||
<li><code>option</code> elements.</li> | ||
|
||
<li><span>script-supporting elements</span>.</li> | ||
|
||
<li><code>noscript</code> elements.</li> | ||
|
||
<li><code>div</code> elements.</li> | ||
</ul> | ||
|
||
<h6>Option element inner content elements</h6> | ||
|
||
<p><dfn>Option element inner content elements</dfn> are the elements which are allowed as | ||
descendants of <code>option</code> elements.</p> | ||
|
||
<p>The following are <span>option element inner content elements</span>:</p> | ||
|
||
<ul class="brief category-list"> | ||
<li><span>Text content</span>.</li> | ||
|
||
<li><span>Palpable content</span> except for <span>interactive content</span>.</li> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<li><span>script-supporting elements</span>.</li> | ||
|
||
<li><code>noscript</code> elements.</li> | ||
|
||
<li><code>span</code> elements.</li> | ||
|
||
<li><code>img</code> elements.</li> | ||
|
||
<li><span>SVG <code>svg</code></span> elements.</li> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</ul> | ||
|
||
|
||
|
||
<h5>Transparent content models</h5> | ||
|
||
|
@@ -19774,6 +19836,7 @@ and is further discussed below.</div></code></pre> | |
<dl class="element"> | ||
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||
<dd><span>Flow content</span>.</dd> | ||
<dd><span>Select element inner content elements</span>.</dd> | ||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dd>Where <span>flow content</span> is expected.</dd> | ||
<dd>As a child of a <code>select</code> element.</dd> | ||
|
@@ -21508,12 +21571,16 @@ included with Exhibit B. | |
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||
<dd><span>Flow content</span>.</dd> | ||
<dd><span>Palpable content</span>.</dd> | ||
<dd><span>Select element inner content elements</span>.</dd> | ||
<dd><span>Optgroup element inner content elements</span>.</dd> | ||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dd>Where <span>flow content</span> is expected.</dd> | ||
<dd>As a child of a <code>dl</code> element.</dd> | ||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||
<dd>If the element is a child of a <code>dl</code> element: one or more <code>dt</code> elements followed by one or more <code>dd</code> elements, optionally intermixed with <span>script-supporting elements</span>.</dd> | ||
<dd>If the element is not a child of a <code>dl</code> element: <span>flow content</span>.</dd> | ||
<dd>Otherwise, if the element is a descendant of an <code>optgroup</code> element: Zero or more <span>optgroup element inner content elements</span>.</dd> | ||
<dd>Otherwise, if the element is a descendant of a <code>select</code> element: Zero or more <span>select element inner content elements</span>.</dd> | ||
<dd>Otherwise: <span>flow content</span>.</dd> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dd><span>Global attributes</span></dd> | ||
<dt><span | ||
|
@@ -24325,10 +24392,12 @@ wormhole connection.</mark></p></code></pre> | |
<dd><span>Flow content</span>.</dd> | ||
<dd><span>Phrasing content</span>.</dd> | ||
<dd><span>Palpable content</span>.</dd> | ||
<dd><span>Option element inner content elements</span>.</dd> | ||
<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> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||
<dd><span>Phrasing content</span>.</dd> | ||
<dd>If the element is a descendant of an <code>option</code> element: Zero or more <span>option element inner content elements</span>.</dd> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<dd>Otherwise: <span>Phrasing content</span>.</dd> | ||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||
<dd><span>Global attributes</span></dd> | ||
<dt><span | ||
|
@@ -29053,6 +29122,7 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> { | |
<dd><span>Form-associated element</span>.</dd> | ||
<dd>If the element has a <code data-x="attr-hyperlink-usemap">usemap</code> attribute: <span>Interactive content</span>.</dd> | ||
<dd><span>Palpable content</span>.</dd> | ||
<dd><span>Option element inner content elements</span>.</dd> | ||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||
<dd>Where <span>embedded content</span> is expected.</dd> | ||
<dd>As a child of a <code>picture</code> element, after all <code>source</code> elements.</dd> | ||
|
@@ -42316,8 +42386,9 @@ interface <dfn interface>HTMLAreaElement</dfn> : <span>HTMLElement</span> { | |
<h4 id="svg-0">SVG</h4> | ||
|
||
<p>The <span>SVG <code>svg</code></span> element falls into the <span>embedded content</span>, | ||
<span>phrasing content</span>, <span>flow content</span>, and <span>palpable content</span> | ||
categories for the purposes of the content models in this specification.</p> | ||
<span>phrasing content</span>, <span>flow content</span>, <span>palpable content</span>, and | ||
<span>option element inner content elements</span> categories for the purposes of the content | ||
models in this specification.</p> | ||
|
||
<p>When the <span>SVG <code>foreignObject</code></span> element contains elements from the | ||
<span>HTML namespace</span>, such elements must all be <span>flow content</span>.</p> | ||
|
@@ -52987,6 +53058,7 @@ You cannot submit this form when the field is incorrect.</samp></pre> | |
<dd><span>Palpable content</span>.</dd> | ||
<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> | ||
<dd>As the first child of a <code>select</code> element.</dd> | ||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||
<dd><span>Phrasing content</span>, but there must be no <span>interactive content</span> | ||
descendant and no descendant with the <code data-x="attr-tabindex">tabindex</code> attribute | ||
|
@@ -53203,7 +53275,7 @@ 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 one <code>button</code> element if the <code>select</code> is a <span>drop-down box</span> followed by zero or more <span>select element inner content elements</span>.</dd> | ||
<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> | ||
|
@@ -53930,11 +54002,11 @@ interface <dfn interface>HTMLDataListElement</dfn> : <span>HTMLElement</span> { | |
|
||
<dl class="element"> | ||
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||
<dd>None.</dd> | ||
<dd><span>Select element inner content elements</span>.</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> | ||
<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 one <code>legend</code> element followed by zero or more <span>optgroup element inner content elements</span>.</dd> | ||
<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> | ||
|
@@ -54027,19 +54099,16 @@ interface <dfn interface>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> { | |
|
||
<dl class="element"> | ||
<dt><span data-x="concept-element-categories">Categories</span>:</dt> | ||
<dd>None.</dd> | ||
<dd><span>Select element inner content elements</span>.</dd> | ||
<dd><span>Optgroup element inner content elements</span>.</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: Zero or more <span>option element inner content elements</span>.</dd> | ||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||
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. "Content model:" should become the following.
Because the submitted value must be simply text, and "option element inner content elements" is only used to decorate label text. |
||
<dd><span>Global attributes</span></dd> | ||
<dd><code data-x="attr-option-disabled">disabled</code></dd> | ||
|
@@ -55773,6 +55842,7 @@ interface <dfn interface>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> { | |
<dd>None.</dd> | ||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||
<dd>As the <span>first child</span> of a <code>fieldset</code> element.</dd> | ||
<dd>As the <span>first child</span> of an <code>optgroup</code> element.</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. Some sentence should be added to prose of section of "4.10.16 The legend element".
↓
|
||
<dt><span data-x="concept-element-content-model">Content model</span>:</dt> | ||
<dd><span>Phrasing content</span>, optionally intermixed with <span>heading content</span>.</dd> | ||
josepharhar marked this conversation as resolved.
Show resolved
Hide resolved
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. it might make more sense to split this out into two lines. the line as it is in the spec for a legend as a child of a fieldset and a separate line to indicate that in the context of an optgroup, a legend may contain phrasing content but there must be no interactive content descendant and no descendant with the tabindex attribute specified. |
||
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt> | ||
|
@@ -63298,6 +63368,9 @@ not-slash = %x0000-002E / %x0030-10FFFF | |
<dd><span>Metadata content</span>.</dd> | ||
<dd><span>Flow content</span>.</dd> | ||
<dd><span>Phrasing content</span>.</dd> | ||
<dd><span>Select element inner content elements</span>.</dd> | ||
<dd><span>Option element inner content elements</span>.</dd> | ||
<dd><span>Optgroup element inner content elements</span>.</dd> | ||
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt> | ||
<dd>In a <code>head</code> element of an <span data-x="HTML documents">HTML document</span>, if there are no ancestor <code>noscript</code> elements.</dd> | ||
<dd>Where <span>phrasing content</span> is expected in <span>HTML documents</span>, if there are no ancestor <code>noscript</code> elements.</dd> | ||
|
@@ -139670,6 +139743,8 @@ interface <dfn interface>External</dfn> { | |
<td><code>HTMLElement</code></td> | ||
</tr> | ||
|
||
<!-- TODO update this and other part of this table after the duplicate parts earlier in the spec | ||
are finalized. --> | ||
<tr> | ||
<th><code>select</code></th> | ||
<td>List box control</td> | ||
|
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"?