Skip to content

Commit 088b919

Browse files
committed
Update content model for customizable select
This PR updated the content model for the <select>, <option>, and <optgroup> elements in support of customizable <select>. Fixes #10317
1 parent 8c74909 commit 088b919

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

source

+37-10
Original file line numberDiff line numberDiff line change
@@ -12785,6 +12785,34 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
1278512785
</ul>
1278612786

1278712787

12788+
<h6>Select element inner content elements</h6>
12789+
12790+
<p><dfn>Select element inner content elements</dfn> are <code>option</code> elements and other
12791+
elements which are used to group and decorate them with a <code>select</code> element.</p>
12792+
12793+
<p>The following are <span>select element inner content elements</span>:</p>
12794+
12795+
<ul class="brief category-list">
12796+
<li><code>option</code> elements.</li>
12797+
12798+
<li><code>optgroup</code> elements.</li>
12799+
12800+
<li><code>hr</code> elements.</li>
12801+
12802+
<li><span>script-supporting elements</span>.</li>
12803+
12804+
<li><code>noscript</code> elements.</li>
12805+
12806+
<li><code>div</code> elements.</li>
12807+
12808+
<li><code>span</code> elements.</li>
12809+
12810+
<li><code>img</code> elements.</li>
12811+
12812+
<li><span>SVG <code>svg</code></span> elements.</li>
12813+
</ul>
12814+
12815+
1278812816

1278912817
<h5>Transparent content models</h5>
1279012818

@@ -53203,7 +53231,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
5320353231
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5320453232
<dd>Where <span>phrasing content</span> is expected.</dd>
5320553233
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
53206-
<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>
53234+
<dd>Zero or more <span>select element inner content elements</span>.</dd>
53235+
<dd>Zero or one child <code>button</code>.</dd>
5320753236
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5320853237
<dd><span>Global attributes</span></dd>
5320953238
<dd><code data-x="attr-fe-autocomplete">autocomplete</code></dd>
@@ -53932,9 +53961,9 @@ interface <dfn interface>HTMLDataListElement</dfn> : <span>HTMLElement</span> {
5393253961
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
5393353962
<dd>None.</dd>
5393453963
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
53935-
<dd>As a child of a <code>select</code> element.</dd>
53964+
<dd>As a descendant of a <code>select</code> element.</dd>
5393653965
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
53937-
<dd>Zero or more <code>option</code> and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
53966+
<dd>Zero or more <span>select element inner content elements</span>.</dd>
5393853967
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5393953968
<dd><span>Global attributes</span></dd>
5394053969
<dd><code data-x="attr-optgroup-disabled">disabled</code></dd>
@@ -54029,17 +54058,15 @@ interface <dfn interface>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> {
5402954058
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
5403054059
<dd>None.</dd>
5403154060
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
54032-
<dd>As a child of a <code>select</code> element.</dd>
54061+
<dd>As a descendant of a <code>select</code> element.</dd>
5403354062
<dd>As a child of a <code>datalist</code> element.</dd>
54034-
<dd>As a child of an <code>optgroup</code> element.</dd>
54063+
<dd>As a descendant of an <code>optgroup</code> element.</dd>
5403554064
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
5403654065
<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>
5403754066
<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>
54038-
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is not a
54039-
child of a <code>datalist</code> element: <span data-x="text content">Text</span> that is not
54040-
<span>inter-element whitespace</span>.</dd>
54041-
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is a child
54042-
of a <code>datalist</code> element: <span data-x="text content">Text</span>.</dd>
54067+
<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>
54068+
<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>
54069+
5404354070
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5404454071
<dd><span>Global attributes</span></dd>
5404554072
<dd><code data-x="attr-option-disabled">disabled</code></dd>

0 commit comments

Comments
 (0)