- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 23 Oct 2008 15:39:09 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv4036 Modified Files: Overview.html Log Message: WF2: Define title= on <input> with pattern=; clarify how validity states work with disabled controls. (whatwg r2362) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1534 retrieving revision 1.1535 diff -u -d -r1.1534 -r1.1535 --- Overview.html 22 Oct 2008 14:03:05 -0000 1.1534 +++ Overview.html 23 Oct 2008 15:39:07 -0000 1.1535 @@ -8,7 +8,7 @@ <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p> <h1>HTML 5</h1> <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->22 October 2008</h2> + <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->23 October 2008</h2> <dl><!-- ZZZ: update the month/day <dt>This Version:</dt> <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080610/">http://www.w3.org/TR/2008/WD-html5-20080610/</a></dd> @@ -97,7 +97,7 @@ specification's progress along the W3C Recommendation track. <!--ZZZ:--> - This specification is the 22 October 2008 <!--ZZZ "Working Draft"-->Editor's Draft. + This specification is the 23 October 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--> </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of) @@ -5110,8 +5110,8 @@ string indicates that the element has no advisory information.<p>If the <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute's value contains U+000A LINE FEED (LF) characters, the content is split into multiple lines. Each U+000A LINE FEED (LF) character represents a - line break.<p>Some elements, such as <code><a href=#the-link-element>link</a></code> and <code><a href=#the-abbr-element>abbr</a></code>, - define additional semantics for the <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute beyond the semantics + line break.<p>Some elements, such as <code><a href=#the-link-element>link</a></code>, <code><a href=#the-abbr-element>abbr</a></code>, and + <code><a href=#the-input-element>input</a></code>, define additional semantics for the <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute beyond the semantics described above.<p>The <dfn id=dom-title title=dom-title><code>title</code></dfn> DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-title><a href=#the-title-attribute>title</a></code> content attribute.<h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <dfn title=attr-lang><code>lang</code></dfn> and <dfn title=attr-xml-lang><code>xml:lang</code></dfn> @@ -21069,7 +21069,34 @@ except that the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute must match the entire value, not just any subset (somewhat as if it implied a <code title="">^(?:</code> at the start of the - pattern and a <code title="">)$</code> at the end).<h6 id=the-min-and-max-attributes><span class=secno>4.10.4.2.8 </span>The <code title=attr-input-min><a href=#attr-input-min>min</a></code> and <code title=attr-input-max><a href=#attr-input-max>max</a></code> attributes</h6><p>The <dfn id=attr-input-min title=attr-input-min><code>min</code></dfn> and <dfn id=attr-input-max title=attr-input-max><code>max</code></dfn> attributes indicate + pattern and a <code title="">)$</code> at the end).<p>When an <code><a href=#the-input-element>input</a></code> element has a <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute specified, + authors should include a <code title=attr-title><a href=#the-title-attribute>title</a></code> + attribute to give a description of the pattern. User agents may use + the contents of this attribute, if it is present, when informing the + user that the pattern is not matched, or at any other suitable time, + such as in a tooltip or read out by assistive technology when the + control gains focus.<div class=example> + <p>For example, the following snippet:</p> + <pre> +<label> Part number: + <input pattern="[0-9][A-Z]{3}" name="part" + title="A part number is a digit followed by three uppercase letters."/> +</label> +</pre> + <p>...could cause the UA to display an alert such as:</p> + <pre><samp> part number is a digit followed by three uppercase letters. +You cannot complete this form until the field is correct.</samp></pre> + </div><p>When a control has a <code>pattern</code> attribute, the + <code><a href=#the-title-element>title</a></code> attribute, if used, must describe the pattern. + Additional information could also be included, so long as it assists + the user in filling in the control. Otherwise, assistive technology + would be impaired.<p class=example>For instance, if the title attribute contained + the caption of the control, assistive technology could end up saying + something like <samp>The text you have entered does not match the + required pattern. Birthday</samp>, which is not useful.<p>UAs may still show the <code><a href=#the-title-element>title</a></code> in non-error situations + (for example, as a tooltip when hovering over the control), so + authors should be careful not to word <code><a href=#the-title-element>title</a></code>s as if an + error has necessarily occurred.<h6 id=the-min-and-max-attributes><span class=secno>4.10.4.2.8 </span>The <code title=attr-input-min><a href=#attr-input-min>min</a></code> and <code title=attr-input-max><a href=#attr-input-max>max</a></code> attributes</h6><p>The <dfn id=attr-input-min title=attr-input-min><code>min</code></dfn> and <dfn id=attr-input-max title=attr-input-max><code>max</code></dfn> attributes indicate the allowed range of values for the element.<p>Their syntax is defined by the section that defines the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state.<p>If the element has a <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute, and the result of applying the <a href=#concept-input-value-string-number title=concept-input-value-string-number>algorithm to convert a string to a number</a> to the value of the <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute is a a number, then that @@ -22110,50 +22137,55 @@ control.<p>An element can be constrained in various ways. The following is the list of <dfn id=validity-states>validity states</dfn> that a form control can be in, making the control invalid for the purposes of constraint - valiation:<dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt> + validation. (The definitions below are non-normative; other parts of + this specification define more precisely when each state applies or + does not.)<dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt> - <dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> + <dd> <p class=note>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>). </dd> <dt> <dfn id=suffering-from-a-type-mismatch>Suffering from a type mismatch</dfn> </dt> - <dd> <p>When a control that allows arbitrary user input has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is not in the correct + <dd> <p class=note>When a control that allows arbitrary user input has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is not in the correct syntax (<a href=#e-mail-state title=attr-input-type-email>E-mail</a>, <a href=#url-state title=attr-input-type-url>URL</a>). </dd> <dt> <dfn id=suffering-from-a-pattern-mismatch>Suffering from a pattern mismatch</dfn> </dt> - <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't satisfy the + <dd> <p class=note>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't satisfy the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute.</dd> <dt> <dfn id=suffering-from-being-too-long>Suffering from being too long</dfn> </dt> - <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too long for the + <dd> <p class=note>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too long for the <a href=#attr-fe-maxlength title=attr-fe-maxlength>form control <code title="">maxlength</code> attribute</a> (<code><a href=#the-input-element>input</a></code> <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-maxlength><a href=#attr-textarea-maxlength>maxlength</a></code>). </dd> <dt> <dfn id=suffering-from-an-underflow>Suffering from an underflow</dfn> </dt> - <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too low for the <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute.</dd> + <dd> <p class=note>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too low for the <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute.</dd> <dt> <dfn id=suffering-from-an-overflow>Suffering from an overflow</dfn> </dt> - <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too high for the + <dd> <p class=note>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that is too high for the <code title=attr-input-max><a href=#attr-input-max>max</a></code> attribute.</dd> <dt> <dfn id=suffering-from-a-step-mismatch>Suffering from a step mismatch</dfn> </dt> - <dd> <p>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't fit the rules + <dd> <p class=note>When a control has a <a href=#concept-fe-value title=concept-fe-value>value</a> that doesn't fit the rules given by the <code title=attr-input-step><a href=#attr-input-step>step</a></code> attribute.</dd> <dt> <dfn id=suffering-from-a-custom-error>Suffering from a custom error</dfn> </dt> - <dd> <p>When a control's <a href=#custom-validity-error-message>custom validity error message</a> + <dd> <p class=note>When a control's <a href=#custom-validity-error-message>custom validity error message</a> (as set by the element's <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code> method) is not the empty string.</p> </dd> - </dl><p>An element <dfn id=concept-fv-valid title=concept-fv-valid>satisfies its + </dl><p class=note>An element can still suffer from these states even + when the element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>; thus these states can + be represented in the DOM even if validating the form during + submission wouldn't indicate a problem to the user.<p>An element <dfn id=concept-fv-valid title=concept-fv-valid>satisfies its constraints</dfn> if it is not suffering from any of the above <a href=#validity-states>validity states</a>.<h5 id=constraint-validation><span class=secno>4.10.14.2 </span>Constraint validation</h5><p>When the user agent is required to <dfn id=statically-validate-the-constraints>statically validate the constraints</dfn> of <code><a href=#the-form-element>form</a></code> element <var title="">form</var>, it must run the following steps, which return
Received on Thursday, 23 October 2008 15:39:20 UTC