Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 19 additions & 28 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -57092,12 +57092,8 @@ interface <dfn interface>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> {

<ol>
<li><p>If <var>optgroup</var> has a child <code>legend</code> element, then return the result of
<span data-x="strip and collapse ASCII whitespace">stripping and collapsing ASCII
whitespace</span> from the concatenation of <span data-x="concept-cd-data">data</span> of all the
<code>Text</code> node descendants of <var>optgroup</var>'s first child <code>legend</code>
element, in <span>tree order</span>, excluding any that are descendants of descendants of the
<code>legend</code> that are themselves <code>script</code> or <span>SVG
<code>script</code></span> elements.</p></li>
<span>get HTML-aware text content</span> given <var>optgroup</var>'s first <code>legend</code>
element child and true.</p></li>

<li><p>Otherwise, return the value of <var>optgroup</var>'s <code
data-x="attr-optgroup-label">label</code> attribute.</p></li>
Expand Down Expand Up @@ -57257,8 +57253,8 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p>The <dfn element-attr for="option"><code data-x="attr-option-value">value</code></dfn>
attribute provides a value for element. The <dfn data-x="concept-option-value">value</dfn> of an
<code>option</code> element is the value of the <code data-x="attr-option-value">value</code>
content attribute, if there is one, or, if there is not, the result of <span>collect option
text</span> given <span>this</span> and false.</p>
content attribute, if there is one, or, if there is not, the result of <span>get HTML-aware text
content</span> given <span>this</span> and false.</p>
</div>

<p>The <dfn element-attr for="option"><code data-x="attr-option-selected">selected</code></dfn>
Expand Down Expand Up @@ -57535,8 +57531,8 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<div algorithm>
<p>The <dfn attribute for="HTMLOptionElement"><code data-x="dom-option-text">text</code></dfn>
getter steps are to return the result of <span>collect option text</span> given <span>this</span>
and false.</p>
getter steps are to return the result of <span>get HTML-aware text content</span> given
<span>this</span> and false.</p>
</div>

<div algorithm>
Expand Down Expand Up @@ -57595,14 +57591,15 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
</div>

<div algorithm>
<p>To <dfn>collect option text</dfn>, given an <code>option</code> element <var>option</var> and a
<p>To <dfn>get HTML-aware text content</dfn>, given an element <var>element</var> and a
boolean <var>includeAltText</var>:</p>

<ol>
<li><p>Let <var>text</var> be the empty string.</p></li>

<li>
<p>For each <span>descendant</span> <var>descendant</var> of <var>option</var> in <span>tree order</span>:</p>
<p>For each <span>descendant</span> <var>descendant</var> of <var>element</var> in <span>tree
order</span>:</p>

<ol>
<li><p>If <var>descendant</var> is a <code>script</code> or <span>SVG
Expand All @@ -57613,20 +57610,13 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
concatenation of <var>text</var> and <var>descendant</var>'s <span
data-x="concept-cd-data">data</span>.</p></li>

<li>
<p>If <var>descendant</var> is an <code>img</code> element and <var>includeAltText</var> is
true, then:</p>

<ol>
<li><p>If the value of <var>descendant</var>'s <code data-x="attr-img-alt">alt</code>
attribute is not empty, then set <var>text</var> to the concatenation of <var>text</var>,
<code data-x="">" "</code>, the value of <var>descendant</var>'s <code
data-x="attr-img-alt">alt</code> attribute, and <code data-x="">" "</code>.</p></li>
<li><p>If <var>descendant</var> is an <code>img</code> element with an <code
data-x="attr-img-alt">alt</code> attribute and <var>includeAltText</var> is true, then set
<var>text</var> to the concatenation of <var>text</var> and the value of
<var>descendant</var>'s <code data-x="attr-img-alt">alt</code> attribute.</p></li>

<li><p><span>Continue</span> skipping all <span data-x="descendant">descendants</span> of
<var>descendant</var>.</p></li>
</ol>
</li>
<li><p>If <var>descendant</var> is an <code>img</code> element, then <span>continue</span>
skipping all <span data-x="descendant">descendants</span> of <var>descendant</var>.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -148366,8 +148356,9 @@ progress { appearance: auto; }</code></pre>
<p>The <span>'::checkmark'</span> pseudo-element only applies to <code>option</code> elements
which are <span data-x="option-base-appearance">being rendered with base appearance</span>.</p>

<p>An <code>optgroup</code> element is <span>expected</span> to be rendered by displaying the
element's <code data-x="attr-optgroup-label">label</code> attribute.</p>
<p>An <code>optgroup</code> element is <span>expected</span> to be rendered by displaying the result
of <span data-x="concept-optgroup-label">get an <code>optgroup</code> element's
label</span> given the element.</p>

<div algorithm>
<p>To determine if a <dfn><code>select</code>'s <code>option</code>s are being rendered with base
Expand All @@ -148392,7 +148383,7 @@ progress { appearance: auto; }</code></pre>
being rendered with base appearance</span>.</p>

<p>An <code>option</code> element is <span>expected</span> to be rendered by displaying the result
of <span>collect option text</span> given the <code>option</code> and true, indented under its
of <span>get HTML-aware text content</span> given the <code>option</code> and true, indented under its
<code>optgroup</code> element if it has one. If the <code>option</code> <span
data-x="option-base-appearance">is being rendered with base appearance</span> and the
<code>option</code>'s <code data-x="attr-option-label">label</code> attribute is not set, then the
Expand Down