Skip to content

Commit a543771

Browse files
committed
Update content model for select
This needs refinement after accessibility semantics/constraints are figured out: whatwg#10317
1 parent a57c84e commit a543771

File tree

1 file changed

+76
-10
lines changed

1 file changed

+76
-10
lines changed

source

+76-10
Original file line numberDiff line numberDiff line change
@@ -4280,6 +4280,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
42804280
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-describedby"><code data-x="attr-aria-describedby">aria-describedby</code></dfn></li>
42814281
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-disabled"><code data-x="attr-aria-disabled">aria-disabled</code></dfn></li>
42824282
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-label"><code data-x="attr-aria-label">aria-label</code></dfn></li>
4283+
<li><dfn data-x-href="https://w3c.github.io/aria/#aria-hidden"><code data-x="attr-aria-hidden">aria-hidden</code></dfn></li>
42834284
</ul>
42844285

42854286
<p>Finally, the following terms are defined <cite>ARIA</cite>: <ref>ARIA</ref></p>
@@ -4294,6 +4295,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
42944295
</dd>
42954296

42964297

4298+
<dt>WCAG</dt>
4299+
4300+
<dd>
4301+
<p>The following terms are defined in <cite>Web Content Accessibility Guidelines</cite>
4302+
(<cite>WCAG</cite>): <ref>WCAG</ref></p>
4303+
4304+
<ul class="brief">
4305+
<li><dfn data-x-href="https://www.w3.org/TR/WCAG22/#dfn-pure-decoration">pure decoration</dfn></li>
4306+
</ul>
4307+
</dd>
4308+
4309+
42974310
<dt>Content Security Policy</dt>
42984311

42994312
<dd>
@@ -12808,6 +12821,62 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
1280812821
</ul>
1280912822

1281012823

12824+
<h6>Decorative image elements</h6>
12825+
12826+
<p><dfn>Decorative image elements</dfn> are images which are <span>pure decoration</span>, and
12827+
therefore provide no information and have no functionality. Therefore, if they are removed from
12828+
the rendering, there is no loss of information to users.</p>
12829+
12830+
<p>The following are <span>decorative image elements</span>:</p>
12831+
12832+
<ul class="brief category-list">
12833+
<li><code>img</code> elements with the <code data-x="attr-img-alt">alt</code> attribute set to an
12834+
empty string.</li>
12835+
12836+
<li><span>SVG <code>svg</code></span> elements with the <code
12837+
data-x="attr-aria-hidden">aria-hidden</code> attribute set.</li>
12838+
</ul>
12839+
12840+
<h6>Non-decorative image elements</h6>
12841+
12842+
<p><dfn>Non-decorative image elements</dfn> are images which have alt text provided.</p>
12843+
12844+
<p>The following are <span>non-decorative image elements</span>:</p>
12845+
12846+
<ul class="brief category-list">
12847+
<li><code>img</code> elements with the <code data-x="attr-img-alt">alt</code> attribute set to a
12848+
non-empty string.</li>
12849+
12850+
<li><span>SVG <code>svg</code></span> elements with TODO what is the preferred way to set alt
12851+
text on an svg?</li>
12852+
</ul>
12853+
12854+
<h6>Select element inner content elements</h6>
12855+
12856+
<p><dfn>Select element inner content elements</dfn> are <code>option</code> elements and other
12857+
elements which are used to group and decorate them with a <code>select</code> element.</p>
12858+
12859+
<p>The following are <span>select element inner content elements</span>:</p>
12860+
12861+
<ul class="brief category-list">
12862+
<li><code>option</code> elements.</li>
12863+
12864+
<li><code>optgroup</code> elements.</li>
12865+
12866+
<li><code>hr</code> elements.</li>
12867+
12868+
<li><span>script-supporting elements</span>.</li>
12869+
12870+
<li><code>noscript</code> elements.</li>
12871+
12872+
<li><code>div</code> elements.</li>
12873+
12874+
<li><code>span</code> elements.</li>
12875+
12876+
<li><span>decorative image elements</span>.</li>
12877+
</ul>
12878+
12879+
1281112880

1281212881
<h5>Transparent content models</h5>
1281312882

@@ -53226,7 +53295,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
5322653295
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
5322753296
<dd>Where <span>phrasing content</span> is expected.</dd>
5322853297
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
53229-
<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>
53298+
<dd>Zero or more <span>select element inner content elements</span>.</dd>
53299+
<dd>Zero or one child <code>button</code>.</dd>
5323053300
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5323153301
<dd><span>Global attributes</span></dd>
5323253302
<dd><code data-x="attr-fe-autocomplete">autocomplete</code></dd>
@@ -53991,9 +54061,9 @@ interface <dfn interface>HTMLDataListElement</dfn> : <span>HTMLElement</span> {
5399154061
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
5399254062
<dd>None.</dd>
5399354063
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
53994-
<dd>As a child of a <code>select</code> element.</dd>
54064+
<dd>As a descendant of a <code>select</code> element.</dd>
5399554065
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
53996-
<dd>Zero or more <code>option</code> and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
54066+
<dd>Zero or more <span>select element inner content elements</span>.</dd>
5399754067
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5399854068
<dd><span>Global attributes</span></dd>
5399954069
<dd><code data-x="attr-optgroup-disabled">disabled</code></dd>
@@ -54088,17 +54158,13 @@ interface <dfn interface>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> {
5408854158
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
5408954159
<dd>None.</dd>
5409054160
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
54091-
<dd>As a child of a <code>select</code> element.</dd>
54161+
<dd>As a descendant of a <code>select</code> element.</dd>
5409254162
<dd>As a child of a <code>datalist</code> element.</dd>
54093-
<dd>As a child of an <code>optgroup</code> element.</dd>
54163+
<dd>As a descendant of an <code>optgroup</code> element.</dd>
5409454164
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
5409554165
<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>
5409654166
<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>
54097-
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is not a
54098-
child of a <code>datalist</code> element: <span data-x="text content">Text</span> that is not
54099-
<span>inter-element whitespace</span>.</dd>
54100-
<dd>If the element has no <code data-x="attr-option-label">label</code> attribute and is a child
54101-
of a <code>datalist</code> element: <span data-x="text content">Text</span>.</dd>
54167+
<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="non-decorative image elements">non-decorative image</span>, and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
5410254168
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
5410354169
<dd><span>Global attributes</span></dd>
5410454170
<dd><code data-x="attr-option-disabled">disabled</code></dd>

0 commit comments

Comments
 (0)