- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 29 Oct 2008 08:46:33 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv8656
Modified Files:
Overview.html
Log Message:
Define 'button' and 'default button' and define implicit form submission. (whatwg r2379)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1550
retrieving revision 1.1551
diff -u -d -r1.1550 -r1.1551
--- Overview.html 29 Oct 2008 08:23:00 -0000 1.1550
+++ Overview.html 29 Oct 2008 08:46:30 -0000 1.1551
@@ -498,9 +498,11 @@
<li><a href=#security-0><span class=secno>4.10.14.4 </span>Security</a></ol></li>
<li><a href=#form-submission-0><span class=secno>4.10.15 </span>Form submission</a>
<ol>
- <li><a href=#url-encoded-form-data><span class=secno>4.10.15.1 </span>URL-encoded form data</a></li>
- <li><a href=#multipart-form-data><span class=secno>4.10.15.2 </span>Multipart form data</a></li>
- <li><a href=#plain-text-form-data><span class=secno>4.10.15.3 </span>Plain text form data</a></ol></li>
+ <li><a href=#implicit-submission><span class=secno>4.10.15.1 </span>Implicit submission</a></li>
+ <li><a href=#form-submission-algorithm><span class=secno>4.10.15.2 </span>Form submission algorithm</a></li>
+ <li><a href=#url-encoded-form-data><span class=secno>4.10.15.3 </span>URL-encoded form data</a></li>
+ <li><a href=#multipart-form-data><span class=secno>4.10.15.4 </span>Multipart form data</a></li>
+ <li><a href=#plain-text-form-data><span class=secno>4.10.15.5 </span>Plain text form data</a></ol></li>
<li><a href=#resetting-a-form><span class=secno>4.10.16 </span>Resetting a form</a></li>
<li><a href=#event-dispatch><span class=secno>4.10.17 </span>Event dispatch</a></ol></li>
<li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
@@ -18434,9 +18436,9 @@
<dd>Denotes elements that can be associated with <code><a href=#the-label-element>label</a></code>
elements.</dd>
- </dl><p>In addition, some <a href=#category-submit title=category-submit>submittable</a> can be, depending on
- their attributes, <dfn id=concept-button title=concept-button>buttons</dfn>. The
- prose below defines when an element is a button.<h4 id=the-form-element><span class=secno>4.10.1 </span>The <dfn><code>form</code></dfn> element</h4><dl class=element><dt>Categories</dt>
+ </dl><p>In addition, some <a href=#category-submit title=category-submit>submittable
+ elements</a> can be, depending on their attributes, <dfn id=concept-button title=concept-button>buttons</dfn>. The prose below defines when
+ an element is a button. Some buttons are specifically <dfn id=concept-submit-button title=concept-submit-button>submit buttons</dfn>.<h4 id=the-form-element><span class=secno>4.10.1 </span>The <dfn><code>form</code></dfn> element</h4><dl class=element><dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -20737,7 +20739,10 @@
in this section apply.<p>The <code><a href=#the-input-element>input</a></code> element represents a button that, when
activated, submits the form. If the element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, the button's label
must be the value of that attribute; otherwise, it must be an
- implementation-defined string that means "Submit" or some such.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+ implementation-defined string that means "Submit" or some such. The
+ element is a <a href=#concept-button title=concept-button>button</a>,
+ specifically a <a href=#concept-submit-button title=concept-submit-button>submit
+ button</a>.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
the user agent should allow the user to activate the element.<p>The element's <a href=#activation-behavior>activation behavior</a>, if the element
has a <a href=#form-owner>form owner</a>, is to <a href=#concept-form-submit title=concept-form-submit>submit</a> the <a href=#form-owner>form
owner</a> from the <code><a href=#the-input-element>input</a></code> element; otherwise, it is
@@ -20786,7 +20791,10 @@
</div><h6 id=image-button-state><span class=secno>4.10.4.1.18 </span><dfn title=attr-input-type-image>Image Button</dfn> state</h6><p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, the rules
in this section apply.<p>The <code><a href=#the-input-element>input</a></code> element represents either an image from
which a user can select a coordinate and submit the form, or
- alternatively a button from which the user can submit the form.</p><hr><p>The image is given by the <dfn id=attr-input-src title=attr-input-src><code>src</code></dfn> attribute. The <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute must be present, and
+ alternatively a button from which the user can submit the form. The
+ element is a <a href=#concept-button title=concept-button>button</a>,
+ specifically a <a href=#concept-submit-button title=concept-submit-button>submit
+ button</a>.</p><hr><p>The image is given by the <dfn id=attr-input-src title=attr-input-src><code>src</code></dfn> attribute. The <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute must be present, and
must contain a <a href=#valid-url>valid URL</a> referencing a non-interactive,
optionally animated, image resource that is neither paged nor
scripted.<p>When any of the following events occur, the user agent must
@@ -20912,7 +20920,8 @@
in this section apply.<p>The <code><a href=#the-input-element>input</a></code> element represents a button that, when
activated, resets the form. If the element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, the button's label
must be the value of that attribute; otherwise, it must be an
- implementation-defined string that means "Reset" or some such.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+ implementation-defined string that means "Reset" or some such. The
+ element is a <a href=#concept-button title=concept-button>button</a>.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
the user agent should allow the user to activate the element.<p>The element's <a href=#activation-behavior>activation behavior</a>, if the element
has a <a href=#form-owner>form owner</a>, is to <a href=#concept-form-reset title=concept-form-reset>reset</a> the <a href=#form-owner>form owner</a>;
otherwise, it is to do nothing.<p><strong>Constraint validation:</strong> The element is
@@ -20955,7 +20964,7 @@
this section apply.<p>The <code><a href=#the-input-element>input</a></code> element represents a button with no
default behavior. If the element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, the button's label
must be the value of that attribute; otherwise, it must be the empty
- string.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+ string. The element is a <a href=#concept-button title=concept-button>button</a>.<p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
the user agent should allow the user to activate the element. The
element's <a href=#activation-behavior>activation behavior</a> is to do nothing.<p><strong>Constraint validation:</strong> The element is
<a href=#barred-from-constraint-validation>barred from constraint validation</a>.<p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM attribute
@@ -21397,7 +21406,7 @@
</dl><p>The <code><a href=#the-button-element>button</a></code> element represents a button. If the
element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>,
then the user agent should allow the user to activate the
- button.<p>The <dfn id=attr-button-type title=attr-button-type><code>type</code></dfn>
+ button.<p>The element is a <a href=#concept-button title=concept-button>button</a>.<p>The <dfn id=attr-button-type title=attr-button-type><code>type</code></dfn>
attribute controls the behavior of the button when it is activated.
It is an <a href=#enumerated-attribute>enumerated attribute</a>. The following table
lists the keywords and states for the attribute — the keywords
@@ -21415,7 +21424,9 @@
<td><a href=#attr-button-type-button-state title=attr-button-type-button-state>Button</a>
<td>Does nothing.
</table><p>The <i>missing value default</i> is the <a href=#attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</a>
- state.<p>If the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, the <a href=#activation-behavior>activation
+ state.<p>If the <code title=attr-button-type><a href=#attr-button-type>type</a></code> attribute is in
+ the <a href=#attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</a>
+ state, the element is specifically a <a href=#concept-submit-button title=concept-submit-button>submit button</a>.<p>If the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, the <a href=#activation-behavior>activation
behavior</a> of the <code><a href=#the-button-element>button</a></code> element is to run the
steps defined in the following list for the current state of the
element's <code title=attr-button-type><a href=#attr-button-type>type</a></code> attribute.<dl><dt> <dfn id=attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</dfn> </dt>
@@ -22378,7 +22389,23 @@
unintentionally bypassed by users of older user agents or automated
tools that do not implement these features. The constraint
validation features are only intended to improve the user
- experience, not to provide any kind of security mechanism.<h4 id=form-submission-0><span class=secno>4.10.15 </span>Form submission</h4><p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), the user agent must
+ experience, not to provide any kind of security mechanism.<h4 id=form-submission-0><span class=secno>4.10.15 </span>Form submission</h4><h5 id=implicit-submission><span class=secno>4.10.15.1 </span>Implicit submission</h5><p>User agents may establish a <a href=#concept-button title=concept-button>button</a> in each form as being the
+ form's <dfn id=default-button>default button</dfn>. This should be the first <a href=#concept-submit-button title=concept-submit-button>submit button</a> in <a href=#tree-order>tree
+ order</a> whose <a href=#form-owner>form owner</a> is that <code><a href=#the-form-element>form</a></code>
+ element, but user agents may pick another button if another would be
+ more appropriate for the platform. If the platform supports letting
+ the user submit a form implicitly (for example, on some platforms
+ hitting the "enter" key while a text field is focused implicitly
+ submits the form), then doing so must cause the form's <a href=#default-button>default
+ button</a>'s <a href=#activation-behavior>activation behavior</a>, if any, to be
+ run.<p class=note>Consequently, if the <a href=#default-button>default button</a> is
+ <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, the form is not
+ submitted when such an implicit submission mechanism is used. (A
+ button has no <a href=#activation-behavior>activation behavior</a> when disabled.)<p>If the form has no <a href=#concept-submit-button title=concept-submit-button>submit
+ button</a>, then the implicit submission mechanism must just
+ <a href=#concept-form-submit title=concept-form-submit>submit</a> the
+ <code><a href=#the-form-element>form</a></code> element from the <code><a href=#the-form-element>form</a></code> element
+ itself.<h5 id=form-submission-algorithm><span class=secno>4.10.15.2 </span>Form submission algorithm</h5><p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), the user agent must
run the following steps:<ol><li id=sandboxSubmitBlocked><p>If <var title="">form</var> is in
a <code>Document</code> that has no associated <a href=#browsing-context>browsing
context</a> or whose <a href=#browsing-context>browsing context</a> has its
@@ -22874,7 +22901,7 @@
</dl></li>
- </ol><h5 id=url-encoded-form-data><span class=secno>4.10.15.1 </span>URL-encoded form data</h5><p>The <dfn id=application-x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
+ </ol><h5 id=url-encoded-form-data><span class=secno>4.10.15.3 </span>URL-encoded form data</h5><p>The <dfn id=application-x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
algorithm</dfn> is as follows:<ol><li><p>Let <var title="">result</var> be the empty string.</li>
<li>
@@ -22961,7 +22988,7 @@
<li><p>Encode <var title="">result</var> as US-ASCII and return the
resulting byte stream.</li>
- </ol><h5 id=multipart-form-data><span class=secno>4.10.15.2 </span>Multipart form data</h5><p>The <dfn id=multipart-form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
+ </ol><h5 id=multipart-form-data><span class=secno>4.10.15.4 </span>Multipart form data</h5><p>The <dfn id=multipart-form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
algorithm</dfn> is to encode the <var title="">form data set</var>
using the rules described by RFC2388, <cite>Returning Values from
Forms: <code title="">multipart/form-data</code></cite>, and return
@@ -22969,7 +22996,7 @@
<i>field</i>, the name of the entry is the <i>field name</i> and the
value of the entry is the <i>field value</i>.<p>The order of parts must be the same as the order of fields in the
<var title="">form data set</var>. Multiple entries with the same
- name must be treated as distinct fields.</p><!-- XXX define default encoding? --><h5 id=plain-text-form-data><span class=secno>4.10.15.3 </span>Plain text form data</h5><p>The <dfn id=text-plain-encoding-algorithm><code title="">text/plain</code> encoding
+ name must be treated as distinct fields.</p><!-- XXX define default encoding? --><h5 id=plain-text-form-data><span class=secno>4.10.15.5 </span>Plain text form data</h5><p>The <dfn id=text-plain-encoding-algorithm><code title="">text/plain</code> encoding
algorithm</dfn> is as follows:<ol><li><p>Let <var title="">result</var> be the empty string.</li>
<li>
Received on Wednesday, 29 October 2008 08:46:43 UTC