Skip to content

Commit

Permalink
Update content model for select
Browse files Browse the repository at this point in the history
This needs refinement after accessibility semantics/constraints are
figured out: whatwg#10317
  • Loading branch information
josepharhar committed Aug 1, 2024
1 parent 33cebbe commit c37345e
Showing 1 changed file with 54 additions and 13 deletions.
67 changes: 54 additions & 13 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4257,6 +4257,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-describedby"><code data-x="attr-aria-describedby">aria-describedby</code></dfn></li>
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-disabled"><code data-x="attr-aria-disabled">aria-disabled</code></dfn></li>
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-label"><code data-x="attr-aria-label">aria-label</code></dfn></li>
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-hidden"><code data-x="attr-aria-hidden">aria-hidden</code></dfn></li>
</ul>

<p>Finally, the following terms are defined <cite>ARIA</cite>: <ref>ARIA</ref></p>
Expand Down Expand Up @@ -12785,6 +12786,48 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
</ul>


<h6>Decorative image elements</h6>

<p><dfn>Decorative image elements</dfn> are images which don't have any accessibility information
associated with them. Therefore, if they are removed from the rendering, there is no loss of
information to users.</p>

<p>The following are <span>decorative image elements</span>:</p>

<ul class="brief category-list">
<li><code>img</code> elements with the <code data-x="attr-img-alt">alt</code> attribute set to an
empty string.</li>

<li><span>SVG <code>svg</code></span> elements with the <code
data-x="attr-aria-hidden">aria-hidden</code> attribute set.</li>
</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>

<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>

<li><code>span</code> elements.</li>

<li><span>decorative image elements</span>.</li>
</ul>



<h5>Transparent content models</h5>

Expand Down Expand Up @@ -53203,7 +53246,9 @@ 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>Either: Zero or more <span>select element inner content elements</span>.</dd>
<dd>Or: One <code>datalist</code>.</dd>
<dd>Zero or one child <code>button</code>.</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>
Expand Down Expand Up @@ -53853,8 +53898,8 @@ interface <dfn interface>HTMLSelectElement</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>Either: <span>phrasing content</span>.</dd> <!-- we don't require a <select> element descendant, since there might be zero suggestions -->
<dd>Or: Zero or more <code>option</code> and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
<dd>Either: <span>Phrasing content</span> if not the child of a <code>select</code> element.</dd> <!-- we don't require a <select> element descendant, since there might be zero suggestions -->
<dd>Or: 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>
<dt><span
Expand Down Expand Up @@ -53955,9 +54000,9 @@ interface <dfn interface>HTMLDataListElement</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>
<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 <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-optgroup-disabled">disabled</code></dd>
Expand Down Expand Up @@ -54052,17 +54097,13 @@ 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 child of a <code>datalist</code> element.</dd>
<dd>As a child of an <code>optgroup</code> element.</dd>
<dd>As a descendant of a <code>select</code> element.</dd>
<dd>As a descendant of a <code>datalist</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>, <span data-x="decorative image elements">decorative image</span>, and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
<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>
Expand Down

0 comments on commit c37345e

Please sign in to comment.