Skip to content

Commit

Permalink
[giow] (3) Make sure :disabled matches fieldsets inside disabled fiel…
Browse files Browse the repository at this point in the history
…dsets, since apparently that's a thing. Also, editorial cleanup around 'disabled'.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26454
Affected topics: CSS, HTML

git-svn-id: http://svn.whatwg.org/webapps@8753 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 5, 2014
1 parent 7b32124 commit 49900ac
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 71 deletions.
39 changes: 23 additions & 16 deletions complete.html
Expand Up @@ -39320,8 +39320,17 @@ <h4 id=the-fieldset-element>4.10.16 The <dfn><code>fieldset</code></dfn> element
are descendants of the <code id=the-fieldset-element:the-fieldset-element-4><a href=#the-fieldset-element>fieldset</a></code> element's first <code id=the-fieldset-element:the-legend-element-3><a href=#the-legend-element>legend</a></code> element child, if
any, to be <a href=#concept-fe-disabled id=the-fieldset-element:concept-fe-disabled>disabled</a>.</p>

<p>A <code id=the-fieldset-element:the-fieldset-element-5><a href=#the-fieldset-element>fieldset</a></code> element is a <dfn id=concept-fieldset-disabled>disabled
fieldset</dfn> if it matches any of the following conditions:</p>

<ul><li>Its <code id=the-fieldset-element:attr-fieldset-disabled-2><a href=#attr-fieldset-disabled>disabled</a></code> attribute is specified

<li>It is a descendant of another <code id=the-fieldset-element:the-fieldset-element-6><a href=#the-fieldset-element>fieldset</a></code> element whose <code id=the-fieldset-element:attr-fieldset-disabled-3><a href=#attr-fieldset-disabled>disabled</a></code> attribute is specified, and is <em>not</em> a
descendant of that <code id=the-fieldset-element:the-fieldset-element-7><a href=#the-fieldset-element>fieldset</a></code> element's first <code id=the-fieldset-element:the-legend-element-4><a href=#the-legend-element>legend</a></code> element child, if
any.</ul>

<p>The <code id=the-fieldset-element:attr-fae-form-2><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the
<code id=the-fieldset-element:the-fieldset-element-5><a href=#the-fieldset-element>fieldset</a></code> element with its <a href=#form-owner id=the-fieldset-element:form-owner>form owner</a>. The <code id=the-fieldset-element:attr-fe-name-2><a href=#attr-fe-name>name</a></code> attribute represents the element's name.</p>
<code id=the-fieldset-element:the-fieldset-element-8><a href=#the-fieldset-element>fieldset</a></code> element with its <a href=#form-owner id=the-fieldset-element:form-owner>form owner</a>. The <code id=the-fieldset-element:attr-fe-name-2><a href=#attr-fe-name>name</a></code> attribute represents the element's name.</p>


<dl class=domintro><dt><var>fieldset</var> . <code id=the-fieldset-element:dom-fieldset-type-2><a href=#dom-fieldset-type>type</a></code><dd>
Expand All @@ -39343,7 +39352,7 @@ <h4 id=the-fieldset-element>4.10.16 The <dfn><code>fieldset</code></dfn> element
"<code>fieldset</code>".</p>

<p>The <dfn id=dom-fieldset-elements><code>elements</code></dfn> IDL attribute must return an
<code id=the-fieldset-element:htmlformcontrolscollection-2-3><a href=#htmlformcontrolscollection-2>HTMLFormControlsCollection</a></code> rooted at the <code id=the-fieldset-element:the-fieldset-element-6><a href=#the-fieldset-element>fieldset</a></code> element, whose filter
<code id=the-fieldset-element:htmlformcontrolscollection-2-3><a href=#htmlformcontrolscollection-2>HTMLFormControlsCollection</a></code> rooted at the <code id=the-fieldset-element:the-fieldset-element-9><a href=#the-fieldset-element>fieldset</a></code> element, whose filter
matches <a href=#category-listed id=the-fieldset-element:category-listed-2>listed elements</a>.</p>

<p>The <code id=the-fieldset-element:dom-cva-willvalidate-2><a href=#dom-cva-willvalidate>willValidate</a></code>, <code id=the-fieldset-element:dom-cva-validity-2><a href=#dom-cva-validity>validity</a></code>, and <code id=the-fieldset-element:dom-cva-validationmessage-2><a href=#dom-cva-validationmessage>validationMessage</a></code> attributes, and the <code id=the-fieldset-element:dom-cva-checkvalidity-2><a href=#dom-cva-checkvalidity>checkValidity()</a></code>, <code id=the-fieldset-element:dom-cva-reportvalidity-2><a href=#dom-cva-reportvalidity>reportValidity()</a></code>, and <code id=the-fieldset-element:dom-cva-setcustomvalidity-2><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code> methods, are part of the
Expand All @@ -39354,7 +39363,7 @@ <h4 id=the-fieldset-element>4.10.16 The <dfn><code>fieldset</code></dfn> element

<div class=example>

<p>This example shows a <code id=the-fieldset-element:the-fieldset-element-7><a href=#the-fieldset-element>fieldset</a></code> element being used to group a set of related
<p>This example shows a <code id=the-fieldset-element:the-fieldset-element-10><a href=#the-fieldset-element>fieldset</a></code> element being used to group a set of related
controls:</p>

<pre>&lt;fieldset>
Expand Down Expand Up @@ -39391,7 +39400,7 @@ <h4 id=the-fieldset-element>4.10.16 The <dfn><code>fieldset</code></dfn> element

<div class=example>

<p>You can also nest <code id=the-fieldset-element:the-fieldset-element-8><a href=#the-fieldset-element>fieldset</a></code> elements. Here is an example expanding on the previous
<p>You can also nest <code id=the-fieldset-element:the-fieldset-element-11><a href=#the-fieldset-element>fieldset</a></code> elements. Here is an example expanding on the previous
one that does so:</p>

<pre>&lt;fieldset name="clubfields" disabled>
Expand All @@ -39417,10 +39426,10 @@ <h4 id=the-fieldset-element>4.10.16 The <dfn><code>fieldset</code></dfn> element
&lt;/fieldset></pre>

<p>In this example, if the outer "Use Club Card" checkbox is not checked, everything inside the
outer <code id=the-fieldset-element:the-fieldset-element-9><a href=#the-fieldset-element>fieldset</a></code>, including the two radio buttons in the legends of the two nested
<code id=the-fieldset-element:the-fieldset-element-10><a href=#the-fieldset-element>fieldset</a></code>s, will be disabled. However, if the checkbox is checked, then the radio
outer <code id=the-fieldset-element:the-fieldset-element-12><a href=#the-fieldset-element>fieldset</a></code>, including the two radio buttons in the legends of the two nested
<code id=the-fieldset-element:the-fieldset-element-13><a href=#the-fieldset-element>fieldset</a></code>s, will be disabled. However, if the checkbox is checked, then the radio
buttons will both be enabled and will let you select which of the two inner
<code id=the-fieldset-element:the-fieldset-element-11><a href=#the-fieldset-element>fieldset</a></code>s is to be enabled.</p>
<code id=the-fieldset-element:the-fieldset-element-14><a href=#the-fieldset-element>fieldset</a></code>s is to be enabled.</p>

</div>

Expand Down Expand Up @@ -39773,8 +39782,9 @@ <h5 id=enabling-and-disabling-form-controls:-the-disabled-attribute>4.10.19.5 En
<p>A form control is <dfn id=concept-fe-disabled>disabled</dfn> if any of the following
conditions are met:</p>

<ol><li>The <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:attr-fe-disabled-2><a href=#attr-fe-disabled>disabled</a></code> attribute is a conforming attribute on
this element, and is specified on this element (regardless of its value).<li>The element is a descendant of a <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> element whose <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:attr-fieldset-disabled><a href=#attr-fieldset-disabled>disabled</a></code> attribute is specified, and is <em>not</em> a
<ol><li>The element is a <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-button-element><a href=#the-button-element>button</a></code>, <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-input-element><a href=#the-input-element>input</a></code>, <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-select-element><a href=#the-select-element>select</a></code>, or
<code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-textarea-element><a href=#the-textarea-element>textarea</a></code> element, and the <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:attr-fe-disabled-2><a href=#attr-fe-disabled>disabled</a></code> attribute
is specified on this element (regardless of its value).<li>The element is a descendant of a <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> element whose <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:attr-fieldset-disabled><a href=#attr-fieldset-disabled>disabled</a></code> attribute is specified, and is <em>not</em> a
descendant of that <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-fieldset-element-2><a href=#the-fieldset-element>fieldset</a></code> element's first <code id=enabling-and-disabling-form-controls:-the-disabled-attribute:the-legend-element><a href=#the-legend-element>legend</a></code> element child, if
any.</ol>

Expand Down Expand Up @@ -50513,9 +50523,9 @@ <h4 id=footnotes>4.13.5 Footnotes</h4>
<h3 id=disabled-elements>4.14 Disabled elements</h3>

<p>An element is said to be <dfn id=concept-element-disabled>actually disabled</dfn> if it
falls into one of the following categories:</p>
one of the following:</p>

<ul><li><code id=disabled-elements:the-button-element><a href=#the-button-element>button</a></code> elements that are <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled>disabled</a><li><code id=disabled-elements:the-input-element><a href=#the-input-element>input</a></code> elements that are <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-2>disabled</a><li><code id=disabled-elements:the-select-element><a href=#the-select-element>select</a></code> elements that are <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-3>disabled</a><li><code id=disabled-elements:the-textarea-element><a href=#the-textarea-element>textarea</a></code> elements that are <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-4>disabled</a><li><code id=disabled-elements:the-optgroup-element><a href=#the-optgroup-element>optgroup</a></code> elements that have a <code id=disabled-elements:attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute<li><code id=disabled-elements:the-option-element><a href=#the-option-element>option</a></code> elements that are <a href=#concept-option-disabled id=disabled-elements:concept-option-disabled>disabled</a><li><code id=disabled-elements:the-menuitem-element><a href=#the-menuitem-element>menuitem</a></code> elements that have a <code id=disabled-elements:attr-menuitem-disabled><a href=#attr-menuitem-disabled>disabled</a></code> attribute<li><code id=disabled-elements:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> elements that have a <code id=disabled-elements:attr-fieldset-disabled><a href=#attr-fieldset-disabled>disabled</a></code> attribute</ul>
<ul><li>a <code id=disabled-elements:the-button-element><a href=#the-button-element>button</a></code> element that is <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled>disabled</a><li>an <code id=disabled-elements:the-input-element><a href=#the-input-element>input</a></code> element that is <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-2>disabled</a><li>a <code id=disabled-elements:the-select-element><a href=#the-select-element>select</a></code> element that is <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-3>disabled</a><li>a <code id=disabled-elements:the-textarea-element><a href=#the-textarea-element>textarea</a></code> element that is <a href=#concept-fe-disabled id=disabled-elements:concept-fe-disabled-4>disabled</a><li>an <code id=disabled-elements:the-optgroup-element><a href=#the-optgroup-element>optgroup</a></code> element that has a <code id=disabled-elements:attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute<li>an <code id=disabled-elements:the-option-element><a href=#the-option-element>option</a></code> element that is <a href=#concept-option-disabled id=disabled-elements:concept-option-disabled>disabled</a><li>a <code id=disabled-elements:the-menuitem-element><a href=#the-menuitem-element>menuitem</a></code> element that has a <code id=disabled-elements:attr-menuitem-disabled><a href=#attr-menuitem-disabled>disabled</a></code> attribute<li>a <code id=disabled-elements:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> element that is a <a href=#concept-fieldset-disabled id=disabled-elements:concept-fieldset-disabled>disabled fieldset</a></ul>

<p class=note>This definition is used to determine what elements <a href=#specially-focusable id=disabled-elements:specially-focusable>can be focused</a> and which elements match the <code id=disabled-elements:selector-disabled><a href=#selector-disabled>:disabled</a></code> pseudo-class.</p>

Expand Down Expand Up @@ -50660,12 +50670,9 @@ <h4 id=pseudo-classes>4.15.2 Pseudo-classes</h4>
<dt><dfn id=selector-enabled><code>:enabled</code></dfn><dd>

<p>The <code id=pseudo-classes:selector-enabled><a href=#selector-enabled>:enabled</a></code> pseudo-class must match any element
falling into one of the following categories:</p>
that is one of the following:</p>

<ul><li><code id=pseudo-classes:the-a-element-3><a href=#the-a-element>a</a></code> elements that have an <code id=pseudo-classes:attr-hyperlink-href-5><a href=#attr-hyperlink-href>href</a></code>
attribute<li><code id=pseudo-classes:the-area-element-3><a href=#the-area-element>area</a></code> elements that have an <code id=pseudo-classes:attr-hyperlink-href-6><a href=#attr-hyperlink-href>href</a></code>
attribute<li><code id=pseudo-classes:the-link-element-3><a href=#the-link-element>link</a></code> elements that have an <code id=pseudo-classes:attr-link-href-3><a href=#attr-link-href>href</a></code>
attribute<li><code id=pseudo-classes:the-button-element-3><a href=#the-button-element>button</a></code> elements that are not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-2>disabled</a><li><code id=pseudo-classes:the-input-element-2><a href=#the-input-element>input</a></code> elements that are not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-3>disabled</a><li><code id=pseudo-classes:the-select-element><a href=#the-select-element>select</a></code> elements that are not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-4>disabled</a><li><code id=pseudo-classes:the-textarea-element><a href=#the-textarea-element>textarea</a></code> elements that are not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-5>disabled</a><li><code id=pseudo-classes:the-optgroup-element><a href=#the-optgroup-element>optgroup</a></code> elements that do not have a <code id=pseudo-classes:attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute<li><code id=pseudo-classes:the-option-element><a href=#the-option-element>option</a></code> elements that are not <a href=#concept-option-disabled id=pseudo-classes:concept-option-disabled>disabled</a><li><code id=pseudo-classes:the-menuitem-element-2><a href=#the-menuitem-element>menuitem</a></code> elements that do not have a <code id=pseudo-classes:attr-menuitem-disabled-2><a href=#attr-menuitem-disabled>disabled</a></code> attribute<li><code id=pseudo-classes:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> elements that do not have a <code id=pseudo-classes:attr-fieldset-disabled><a href=#attr-fieldset-disabled>disabled</a></code> attribute</ul>
<ul><li>an <code id=pseudo-classes:the-a-element-3><a href=#the-a-element>a</a></code> element that has an <code id=pseudo-classes:attr-hyperlink-href-5><a href=#attr-hyperlink-href>href</a></code> attribute<li>an <code id=pseudo-classes:the-area-element-3><a href=#the-area-element>area</a></code> element that has an <code id=pseudo-classes:attr-hyperlink-href-6><a href=#attr-hyperlink-href>href</a></code> attribute<li>a <code id=pseudo-classes:the-link-element-3><a href=#the-link-element>link</a></code> element that has an <code id=pseudo-classes:attr-link-href-3><a href=#attr-link-href>href</a></code> attribute<li>a <code id=pseudo-classes:the-button-element-3><a href=#the-button-element>button</a></code> element that is not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-2>disabled</a><li>an <code id=pseudo-classes:the-input-element-2><a href=#the-input-element>input</a></code> element that is not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-3>disabled</a><li>a <code id=pseudo-classes:the-select-element><a href=#the-select-element>select</a></code> element that is not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-4>disabled</a><li>a <code id=pseudo-classes:the-textarea-element><a href=#the-textarea-element>textarea</a></code> element that is not <a href=#concept-fe-disabled id=pseudo-classes:concept-fe-disabled-5>disabled</a><li>an <code id=pseudo-classes:the-optgroup-element><a href=#the-optgroup-element>optgroup</a></code> element that does not have a <code id=pseudo-classes:attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute<li>an <code id=pseudo-classes:the-option-element><a href=#the-option-element>option</a></code> element that is not <a href=#concept-option-disabled id=pseudo-classes:concept-option-disabled>disabled</a><li>a <code id=pseudo-classes:the-menuitem-element-2><a href=#the-menuitem-element>menuitem</a></code> element that does not have a <code id=pseudo-classes:attr-menuitem-disabled-2><a href=#attr-menuitem-disabled>disabled</a></code> attribute<li>a <code id=pseudo-classes:the-fieldset-element><a href=#the-fieldset-element>fieldset</a></code> element that is not a <a href=#concept-fieldset-disabled id=pseudo-classes:concept-fieldset-disabled>disabled fieldset</a></ul>

<dt><dfn id=selector-disabled><code>:disabled</code></dfn><dd>

Expand Down

0 comments on commit 49900ac

Please sign in to comment.