Skip to content

Commit f7b4402

Browse files
authored
Make option and optgroup actually disabled inside disabled select
This PR makes option:disabled and optgroup:disabled match when either are inside disabled select elements, without changing the behavior of other algorithms like the selectedness setting algorithm when options are inside disabled selects. Also see w3c/csswg-drafts#13383
1 parent cf4109f commit f7b4402

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

source

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57873,15 +57873,15 @@ interface <dfn interface>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
5787357873
</div>
5787457874

5787557875
<div algorithm>
57876-
<p>To get the <dfn><code>option</code> element nearest ancestor <code>select</code></dfn> given an
57877-
<code>option</code> <var>option</var>, run these steps. They return a <code>select</code> or
57878-
null.</p>
57876+
<p>To get the <dfn data-x="option element nearest ancestor select">nearest ancestor
57877+
<code>select</code></dfn> given an <code>Element</code> <var>element</var>, run these steps. They
57878+
return a <code>select</code> or null.</p>
5787957879

5788057880
<ol>
5788157881
<li><p>Let <var>ancestorOptgroup</var> be null.</p></li>
5788257882

5788357883
<li>
57884-
<p>For each <var>ancestor</var> of <var>option</var>'s <span data-x="ancestor">ancestors</span>,
57884+
<p>For each <var>ancestor</var> of <var>elements</var>'s <span data-x="ancestor">ancestors</span>,
5788557885
in reverse <span>tree order</span>:</p>
5788657886

5788757887
<ol>
@@ -79597,9 +79597,14 @@ contradict people?
7959779597

7959879598
<li>a <code>textarea</code> element that is <span data-x="concept-fe-disabled">disabled</span></li>
7959979599

79600-
<li>an <code>optgroup</code> element that has a <code data-x="attr-optgroup-disabled">disabled</code> attribute</li>
79600+
<li>an <code>optgroup</code> element that has a <code
79601+
data-x="attr-optgroup-disabled">disabled</code> attribute or whose <span data-x="option element
79602+
nearest ancestor select">nearest ancestor <code>select</code></span> is <span
79603+
data-x="concept-fe-disabled">disabled</span></li>
7960179604

79602-
<li>an <code>option</code> element that is <span data-x="concept-option-disabled">disabled</span></li>
79605+
<li>an <code>option</code> element that is <span data-x="concept-option-disabled">disabled</span>
79606+
or whose <span data-x="option element nearest ancestor select">nearest ancestor
79607+
<code>select</code></span> is <span data-x="concept-fe-disabled">disabled</span></li>
7960379608

7960479609
<li>a <code>fieldset</code> element that is a <span data-x="concept-fieldset-disabled">disabled fieldset</span></li>
7960579610

0 commit comments

Comments
 (0)