Short URL: http://html5.org/r/2314
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2314 | WF2: required='' only applies to mutable text controls; <output> .value, .defaultValue | 2008-10-10 00:26 |
Index: source =================================================================== --- source (revision 2313) +++ source (revision 2314) @@ -28894,6 +28894,7 @@ <span>limited to only positive non-zero numbers</span>.</p> + <h6>The <code title="attr-input-required">required</code> attribute</h6> <p>The <dfn title="attr-input-required"><code>required</code></dfn> @@ -28905,6 +28906,7 @@ title="concept-input-required">required</i>, and its <code title="dom-input-value">value</code> DOM attribute applies and is in the mode <span title="dom-input-value-value">value</span>, and the + element is <i title="concept-input-mutable">mutable</i>, and the element's <span title="concept-fe-value">value</span> is the empty string, then the element is <span>suffering from being missing</span>.</p> @@ -30252,9 +30254,10 @@ <p><strong>Constraint validation:</strong> If the element has its <code title="attr-textarea-required">required</code> attribute - specified, and the element's <span - title="concept-fe-value">value</span> is the empty string, then the - element is <span>suffering from being missing</span>.</p> + specified, and the element is <span + title="concept-textarea-mutable">mutable</span>, and the element's + <span title="concept-fe-value">value</span> is the empty string, + then the element is <span>suffering from being missing</span>.</p> <p>The <code title="attr-fae-form">form</code> attribute is used to explicitly associate the <code>textarea</code> element with its @@ -30265,8 +30268,7 @@ submitted. The <code title="attr-fe-autofocus">autofocus</code> attribute controls focus.</p> - <p>The <dfn title="dom-textarea-accept"><code>accept</code></dfn>, - <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn + <p>The <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn title="dom-textarea-required"><code>required</code></dfn>, <dfn title="dom-textarea-rows"><code>rows</code></dfn>, and <dfn title="dom-textarea-wrap"><code>wrap</code></dfn> attributes must @@ -30339,7 +30341,7 @@ boolean <span title="dom-cva-checkValidatity">checkValidity</span>(); void <span title="dom-cva-setCustomValidity">setCustomValidity</span>(in DOMString error); };</pre> - </dd> + </dd> </dl> <p class="XXX">...</p> @@ -30349,6 +30351,64 @@ <span>form owner</span>. The <code title="attr-fe-name">name</code> attribute represents the element's name.</p> + <p>The element has a <dfn title="concept-output-mode">value mode + flag</dfn> which is either <i + title="concept-output-mode-value">value</i> or <i + title="concept-output-mode-default">default</i>. Initially the <span + title="concept-output-mode">value mode flag</span> must be set to <i + title="concept-output-mode-default">default</i>.</p> + + <p>When the to <span title="concept-output-mode">value mode + flag</span> is in mode <i + title="concept-output-mode-default">default</i>, the contents of the + element represent both the value of the element and its default + value. When the <span title="concept-output-mode">value mode + flag</span> is in mode <i + title="concept-output-mode-value">value</i>, the contents of the + element represent the value of the element only, and the default + value is only accessible using the <code + title="dom-output-defaultValue">defaultValue</code> DOM + attribute.</p> + + <p>The element also has a <dfn + title="concept-output-defaultValue">default value</dfn>. Initially, + the <span title="concept-output-defaultValue">default value</span> + must be the empty string.</p> + + <p>Whenever the element's descendants are changed in any way, if the + <span title="concept-output-mode">value mode flag</span> is in mode + <i title="concept-output-mode-default">default</i>, the element's + <span title="concept-output-defaultValue">default value</span> must + be set to the value of the element's <code>textContent</code> DOM + attribute.</p> + + <p>The <span title="concept-form-reset-control">reset + algorithm</span> for <code>textarea</code> elements is to set the + element's <code>textContent</code> DOM attribute to the value of the + element's <code title="dom-output-defaultValue">defaultValue</code> + DOM attribute (thus replacing the element's child nodes), and then + to set the element's <span title="concept-output-mode">value mode + flag</span> to <i + title="concept-output-mode-default">default</i>.</p> + + <p>The <dfn title="dom-output-value"><code>value</code></dfn> DOM + attribute must act like the element's <code>textContent</code> DOM + attribute, except that on setting, in addition, before the child + nodes are changed, the element's <span + title="concept-output-mode">value mode flag</span> must be set to <i + title="concept-output-mode-value">value</i>.</p> + + <p>The <dfn + title="dom-output-defaultValue"><code>defaultValue</code></dfn> DOM + attribute, on getting, must return the element's <span + title="concept-output-defaultValue">default value</span>. On + setting, the attribute must set the element's <span + title="concept-output-defaultValue">default value</span>, and, if + the element's <span title="concept-output-mode">value mode + flag</span> is in the mode <i + title="concept-output-mode-default">default</i>, set the element's + <code>textContent</code> DOM attribute as well.</p> + <p>The <code title="dom-cva-willValidate">willValidate</code>, <code title="dom-cva-validity">validity</code>, and <code title="dom-cva-validationMessage">validationMessage</code>