- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 09 Oct 2008 23:57:16 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv11484 Modified Files: Overview.html Log Message: WF2: <textarea maxlength>; also, factoring out common stuff for this from <input> to reduce duplication. (whatwg r2311) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1483 retrieving revision 1.1484 diff -u -d -r1.1483 -r1.1484 --- Overview.html 9 Oct 2008 20:32:39 -0000 1.1483 +++ Overview.html 9 Oct 2008 23:57:13 -0000 1.1484 @@ -463,8 +463,7 @@ <li><a href=#submit-button-state><span class=secno>4.10.4.1.17 </span>Submit Button state</a></li> <li><a href=#image-button-state><span class=secno>4.10.4.1.18 </span>Image Button state</a></li> <li><a href=#reset-button-state><span class=secno>4.10.4.1.19 </span>Reset Button state</a></li> - <li><a href=#button-state><span class=secno>4.10.4.1.20 </span>Button state</a></li> - <li><a href=#common-algorithms><span class=secno>4.10.4.1.21 </span>Common algorithms</a></ol></li> + <li><a href=#button-state><span class=secno>4.10.4.1.20 </span>Button state</a></ol></li> <li><a href=#common-input-element-attributes><span class=secno>4.10.4.2 </span>Common <code>input</code> element attributes</a> <ol> <li><a href=#the-autocomplete-attribute><span class=secno>4.10.4.2.1 </span>The <code title=attr-input-autocomplete>autocomplete</code> attribute</a></li> @@ -491,7 +490,8 @@ <li><a href=#naming-form-controls><span class=secno>4.10.13.1 </span>Naming form controls</a></li> <li><a href=#enabling-and-disabling-form-controls><span class=secno>4.10.13.2 </span>Enabling and disabling form controls</a></li> <li><a href=#a-form-control-s-value><span class=secno>4.10.13.3 </span>A form control's value</a></li> - <li><a href=#autofocusing-a-form-control><span class=secno>4.10.13.4 </span>Autofocusing a form control</a></ol></li> + <li><a href=#autofocusing-a-form-control><span class=secno>4.10.13.4 </span>Autofocusing a form control</a></li> + <li><a href=#limiting-user-input-length><span class=secno>4.10.13.5 </span>Limiting user input length</a></ol></li> <li><a href=#attributes-for-form-submission><span class=secno>4.10.14 </span>Attributes for form submission</a></li> <li><a href=#constraints><span class=secno>4.10.15 </span>Constraints</a> <ol> @@ -1608,7 +1608,10 @@ White_Space characters</dfn> means that the user agent must <a href=#collect-a-sequence-of-characters>collect a sequence of characters</a> that are <a href=#white_space>White_Space</a> characters. In both cases, the collected - characters are not used. <a href=#references>[UNICODE]</a><h4 id=boolean-attributes><span class=secno>2.4.2 </span>Boolean attributes</h4><p>A number of attributes in HTML5 are <dfn id=boolean-attribute title="boolean + characters are not used. <a href=#references>[UNICODE]</a><p>When a user agent is to <dfn id=strip-line-breaks>strip line breaks</dfn> from a + string, the user agent must remove any U+000A LINE FEED (LF) and + U+000D CARRIAGE RETURN (CR) characters from that string.<p>The <dfn id=codepoint-length>codepoint length</dfn> of a string is the number of + Unicode codepoints in that string.<h4 id=boolean-attributes><span class=secno>2.4.2 </span>Boolean attributes</h4><p>A number of attributes in HTML5 are <dfn id=boolean-attribute title="boolean attribute">boolean attributes</dfn>. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.<p>If the attribute is present, its value must either be the empty @@ -19552,7 +19555,7 @@ by the user. User agents must not allow users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as - follows:</strong> <a href=#strip-line-breaks-from-the-value>Strip line breaks from the value</a>.<div class=bookkeeping> + follows:</strong> <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.<div class=bookkeeping> <p>The following common <code><a href=#the-input-element>input</a></code> element content attributes and DOM attributes apply to the element: @@ -19603,7 +19606,7 @@ e-mail address. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string. User agents must not allow users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as - follows:</strong> <a href=#strip-line-breaks-from-the-value>Strip line breaks from the value</a>.<p><strong>Constraint validation:</strong> While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element does not match + follows:</strong> <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>Constraint validation:</strong> While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element does not match the <code>addr-spec</code> token defined in RFC 2822 section 3.4.1, excluding the <code>CFWS</code> subtoken everywhere, and excluding the <code>FWS</code> subtoken everywhere except in the @@ -19660,7 +19663,7 @@ allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string. User agents must not allow users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as - follows:</strong> <a href=#strip-line-breaks-from-the-value>Strip line breaks from the value</a>.<p><strong>Constraint validation:</strong> While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a + follows:</strong> <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>Constraint validation:</strong> While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a <a href=#valid-url>valid URL</a>, the element is <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.<div class=bookkeeping> @@ -19711,7 +19714,7 @@ its <a href=#concept-fe-value title=concept-fe-value>value</a> should be editable by the user. User agents must not allow users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as - follows:</strong> <a href=#strip-line-breaks-from-the-value>Strip line breaks from the value</a>.<div class=bookkeeping> + follows:</strong> <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.<div class=bookkeeping> <p>The following common <code><a href=#the-input-element>input</a></code> element content attributes and DOM attributes apply to the element: @@ -20922,9 +20925,7 @@ <p>The <code class=no-backref title=event-input-input><a href=#event-input-input>input</a></code> and <code class=no-backref title=event-input-change><a href=#event-input-change>change</a></code> events do not fire.</p> - </div><h6 id=common-algorithms><span class=secno>4.10.4.1.21 </span>Common algorithms</h6><p>When a user agent is to <dfn id=strip-line-breaks-from-the-value>strip line breaks from the - value</dfn>, the user agent must remove any U+000A LINE FEED (LF) - and U+000D CARRIAGE RETURN (CR) characters from <a href=#concept-fe-value title=concept-fe-value>value</a>.<h5 id=common-input-element-attributes><span class=secno>4.10.4.2 </span>Common <code><a href=#the-input-element>input</a></code> element attributes</h5><p>These attributes only apply to an <code><a href=#the-input-element>input</a></code> element if + </div><h5 id=common-input-element-attributes><span class=secno>4.10.4.2 </span>Common <code><a href=#the-input-element>input</a></code> element attributes</h5><p>These attributes only apply to an <code><a href=#the-input-element>input</a></code> element if its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in a state whose definition declares that the attribute applies. When an attribute doesn't apply to an <code><a href=#the-input-element>input</a></code> element, user @@ -21019,26 +21020,14 @@ the mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>, and the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is the empty string, then the element is <a href=#suffering-from-being-missing>suffering from being - missing</a>.<h6 id=the-maxlength-attribute><span class=secno>4.10.4.2.6 </span>The <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code> attribute</h6><p>The <dfn id=attr-input-maxlength title=attr-input-maxlength><code>maxlength</code></dfn> attribute - allows authors to specify the maximum length allowed for user - input.<p>The <dfn id=codepoint-length>codepoint length</dfn> of a string is the number of - Unicode codepoints in that string.<p>If the attribute is specified, the attribute's value must be a - <a href=#valid-non-negative-integer>valid non-negative integer</a>. If the attribute is - specified and applying the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative - integers</a> to its value results in a number, then that number - is the element's <dfn id=maximum-allowed-value-length>maximum allowed value length</dfn>. If the - attribute is omitted or parsing its value results in an error, then - there is no <a href=#maximum-allowed-value-length>maximum allowed value length</a>.<p>If the <code><a href=#the-input-element>input</a></code> element has a <a href=#maximum-allowed-value-length>maximum allowed + missing</a>.<h6 id=the-maxlength-attribute><span class=secno>4.10.4.2.6 </span>The <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code> attribute</h6><p>The <dfn id=attr-input-maxlength title=attr-input-maxlength><code>maxlength</code></dfn> attribute, + when it applies, is a <a href=#attr-fe-maxlength title=attr-fe-maxlength>form control + <code title="">maxlength</code> attribute</a> controlled by the + <code><a href=#the-input-element>input</a></code> element's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>.<p>If the <code><a href=#the-input-element>input</a></code> element has a <a href=#maximum-allowed-value-length>maximum allowed value length</a>, then the <a href=#codepoint-length>codepoint length</a> of the value of the element's <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute must be equal to or less than the element's <a href=#maximum-allowed-value-length>maximum - allowed value length</a>.<p><strong>Constraint validation:</strong> If an <code><a href=#the-input-element>input</a></code> - element has a <a href=#maximum-allowed-value-length>maximum allowed value length</a>, its <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a> is - false, and the <a href=#codepoint-length>codepoint length</a> of the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is greater than the element's - <a href=#maximum-allowed-value-length>maximum allowed value length</a>, then the element is - <a href=#suffering-from-being-too-long>suffering from being too long</a>.<p>User agents may prevent the user from setting the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to a value whose - <a href=#codepoint-length>codepoint length</a> is greater than the element's - <a href=#maximum-allowed-value-length>maximum allowed value length</a>.<h6 id=the-pattern-attribute><span class=secno>4.10.4.2.7 </span>The <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute</h6><p>The <dfn id=attr-input-pattern title=attr-input-pattern><code>pattern</code></dfn> + allowed value length</a>.<h6 id=the-pattern-attribute><span class=secno>4.10.4.2.7 </span>The <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute</h6><p>The <dfn id=attr-input-pattern title=attr-input-pattern><code>pattern</code></dfn> attribute specifies a regular expression against which the control's <a href=#concept-fe-value title=concept-fe-value>value</a> is to be checked.<p>If specified, the attribute's value must match the <i title="">Pattern</i> production of ECMA 262's grammar. <a href=#references>[ECMA262]</a><p><strong>Constraint validation:</strong> If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and the element's <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> @@ -21801,9 +21790,13 @@ U+000D CARRIAGE RETURN - U+000A LINE FEED (CRLF) character pairs.</li> - </ol><p class=XXX> ... <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn> - - <p class=XXX> ... <dfn id=attr-textarea-required title=attr-textarea-required><code>required</code></dfn> + </ol><p>The <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn> + attribute is a <a href=#attr-fe-maxlength title=attr-fe-maxlength>form control <code title="">maxlength</code> attribute</a> controlled by the + <code><a href=#the-textarea-element>textarea</a></code> element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</a>.<p>If the <code><a href=#the-textarea-element>textarea</a></code> element has a <a href=#maximum-allowed-value-length>maximum allowed + value length</a>, then the element's children must be such that + the <a href=#codepoint-length>codepoint length</a> of the value of the element's + <code><a href=#textcontent>textContent</a></code> DOM attribute is equal to or less than the + element's <a href=#maximum-allowed-value-length>maximum allowed value length</a>.<p class=XXX> ... <dfn id=attr-textarea-required title=attr-textarea-required><code>required</code></dfn> <p class=XXX> ... <dfn id=attr-textarea-accept title=attr-textarea-accept><code>accept</code></dfn> @@ -21955,7 +21948,22 @@ the document was loaded.</p> <pre><input maxlength="256" name="q" value="" autofocus> <input type="submit" value="Search"></pre> - </div><h4 id=attributes-for-form-submission><span class=secno>4.10.14 </span><dfn>Attributes for form submission</dfn></h4><p class=XXX>... <dfn id=attr-fs-action title=attr-fs-action>action</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-action title=dom-fs-action>action</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-action title=concept-fs-action>action</dfn> if present else form's else default</p><!-- XXX mozilla bug 297761 --><p class=XXX>... <dfn id=attr-fs-method title=attr-fs-method>method</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-method title=dom-fs-method>method</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-method title=concept-fs-method>method</dfn> if present else form's else default<p class=XXX>... <dfn id=attr-fs-enctype title=attr-fs-enctype>enctype</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-enctype title=dom-fs-enctype>enctype</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-enctype title=concept-fs-enctype>enctype</dfn> if present els form's else default<p class=XXX>... <dfn id=attr-fs-target title=attr-fs-target>target</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-target title=dom-fs-target>target</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-target title=concept-fs-target>target</dfn> if present else form's else base target else default</p><!-- c.f. hyperlink following --><p>Attributes for form submission can be specified both on + </div><h5 id=limiting-user-input-length><span class=secno>4.10.13.5 </span>Limiting user input length</h5><p>A <dfn id=attr-fe-maxlength title=attr-fe-maxlength>form control <code title="">maxlength</code> attribute</dfn>, controlled by a <var title="">dirty value flag</var> declares a limit on the number of + characters a user can input.<p>If an element has its <a href=#attr-fe-maxlength title=attr-fe-maxlength>form + control <code title="">maxlength</code> attribute</a> specified, + the attribute's value must be a <a href=#valid-non-negative-integer>valid non-negative + integer</a>. If the attribute is specified and applying the + <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a> to its value + results in a number, then that number is the element's <dfn id=maximum-allowed-value-length>maximum + allowed value length</dfn>. If the attribute is omitted or parsing + its value results in an error, then there is no <a href=#maximum-allowed-value-length>maximum + allowed value length</a>.<p><strong>Constraint validation:</strong> If an element has a + <a href=#maximum-allowed-value-length>maximum allowed value length</a>, and its <var title="">dirty value flag</var> is false, and the <a href=#codepoint-length>codepoint + length</a> of the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is greater than the element's + <a href=#maximum-allowed-value-length>maximum allowed value length</a>, then the element is + <a href=#suffering-from-being-too-long>suffering from being too long</a>.<p>User agents may prevent the user from causing the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to be set to a value whose + <a href=#codepoint-length>codepoint length</a> is greater than the element's + <a href=#maximum-allowed-value-length>maximum allowed value length</a>.<h4 id=attributes-for-form-submission><span class=secno>4.10.14 </span><dfn>Attributes for form submission</dfn></h4><p class=XXX>... <dfn id=attr-fs-action title=attr-fs-action>action</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-action title=dom-fs-action>action</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-action title=concept-fs-action>action</dfn> if present else form's else default</p><!-- XXX mozilla bug 297761 --><p class=XXX>... <dfn id=attr-fs-method title=attr-fs-method>method</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-method title=dom-fs-method>method</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-method title=concept-fs-method>method</dfn> if present else form's else default<p class=XXX>... <dfn id=attr-fs-enctype title=attr-fs-enctype>enctype</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-enctype title=dom-fs-enctype>enctype</dfn> DOM attribute<p class=XXX>... <dfn id=conceptfs-enctype title=concept-fs-enctype>enctype</dfn> if present else form's else default<p class=XXX>... <dfn id=attr-fs-target title=attr-fs-target>target</dfn> content attribute<p class=XXX>... <dfn id=dom-fs-target title=dom-fs-target>target</dfn> DOM attribute<p class=XXX>... <dfn id=concept-fs-target title=concept-fs-target>target</dfn> if present else form's else base target else default</p><!-- c.f. hyperlink following --><p>Attributes for form submission can be specified both on <code><a href=#the-form-element>form</a></code> elements and on elements that represent buttons that submit forms, e.g. an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a> state. The attributes on the buttons, when omitted, default to the values given
Received on Thursday, 9 October 2008 23:57:25 UTC