HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2798

File a bug

SVNBugCommentTime (UTC)
2798Support <form autocomplete>2009-02-12 02:48
Index: source
===================================================================
--- source	(revision 2797)
+++ source	(revision 2798)
@@ -26935,6 +26935,7 @@
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-form-accept-charset">accept-charset</code></dd>
    <dd><code title="attr-fs-action">action</code></dd>
+   <dd><code title="attr-form-autocomplete">autocomplete</code></dd>
    <dd><code title="attr-fs-enctype">enctype</code></dd>
    <dd><code title="attr-fs-method">method</code></dd>
    <dd><code title="attr-form-name">name</code></dd>
@@ -26946,6 +26947,7 @@
 interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-form-acceptCharset">acceptCharset</span>;
            attribute DOMString <span title="dom-fs-action">action</span>;
+           attribute boolean <span title="dom-form-autocomplete">autocomplete</span>;
            attribute DOMString <span title="dom-fs-enctype">enctype</span>;
            attribute DOMString <span title="dom-fs-method">method</span>;
            attribute DOMString <span title="dom-form-name">name</span>;
@@ -26987,6 +26989,26 @@
   <code>form</code> elements in the <code
   title="dom-forms">forms</code> collection that it is in, if any.</p>
 
+  <p>The <dfn
+  title="attr-form-autocomplete"><code>autocomplete</code></dfn>
+  attribute is an <span>enumerated attribute</span>. The attribute has
+  two states. The <code title="attr-form-autocomplete-on">on</code>
+  keyword maps to the <dfn
+  title="attr-form-autocomplete-on-state">on</dfn> state, and the
+  <code title="attr-form-autocomplete-off">off</code> keyword maps to
+  the <dfn title="attr-form-autocomplete-off-state">off</dfn>
+  state. The attribute may also be omitted. The <i>missing value
+  default</i> is the <span
+  title="attr-form-autocomplete-on-state">on</span> state. The <span
+  title="attr-form-autocomplete-off-state">off</span> state indicates
+  that by default, <code>input</code> elements in the form will have
+  their <span>resulting autocompletion state</span> set to <i
+  title="">off</i>; the <span
+  title="attr-form-autocomplete-on-state">on</span> state indicates
+  that by default, <code>input</code> elements in the form will have
+  their <span>resulting autocompletion state</span> set to <i
+  title="">on</i>.</p>
+
   <p>The <code title="attr-fs-action">action</code>, <code
   title="attr-fs-enctype">enctype</code>, <code
   title="attr-fs-method">method</code>, <code
@@ -26995,11 +27017,17 @@
   for form submission</span>.</p>
 
   <p>The <dfn
-  title="dom-form-acceptCharset"><code>acceptCharset</code></dfn>
-  and <dfn title="dom-form-name"><code>name</code></dfn> DOM
-  attributes must <span>reflect</span> the respective content
-  attributes of the same name.</p>
+  title="dom-form-autocomplete"><code>autocomplete</code></dfn> and
+  <dfn title="dom-form-name"><code>name</code></dfn> DOM attributes
+  must <span>reflect</span> the respective content attributes of the
+  same name.</p>
 
+  <p>The <dfn
+  title="dom-form-acceptCharset"><code>acceptCharset</code></dfn> DOM
+  attribute must <span>reflect</span> the <code
+  title="attr-form-accept-charset">accept-charset</code> content
+  attribute.</p>
+
   <p>The <dfn title="dom-form-elements"><code>elements</code></dfn>
   DOM attribute must return an <code>HTMLFormControlsCollection</code>
   rooted at the <code>Document</code> node, whose filter matches <span
@@ -31117,21 +31145,18 @@
 
   <h6>The <code title="attr-input-autocomplete">autocomplete</code> attribute</h6>
 
-  <!-- IE also applies it to <form> elements, but only 0.09% of pages
-  use it there, so we don't support that. (It doesn't apply it to
-  <textarea>, so we don't support it there either.) -->
- 
   <p>The <dfn
   title="attr-input-autocomplete"><code>autocomplete</code></dfn>
   attribute is an <span>enumerated attribute</span>. The attribute has
-  two states. The <code title="attr-input-autocomplete-on">on</code>
+  three states. The <code title="attr-input-autocomplete-on">on</code>
   keyword maps to the <dfn
   title="attr-input-autocomplete-on-state">on</dfn> state, and the
   <code title="attr-input-autocomplete-off">off</code> keyword maps to
   the <dfn title="attr-input-autocomplete-off-state">off</dfn>
   state. The attribute may also be omitted. The <i>missing value
-  default</i> is the <span
-  title="attr-input-autocomplete-on-state">on</span> state.</p>
+  default</i> is the <dfn
+  title="attr-input-autocomplete-default-state">default</dfn>
+  state.</p>
 
   <p>The <span title="attr-input-autocomplete-off-state">off</span>
   state indicates that the control's input data is either particularly
@@ -31147,15 +31172,41 @@
   to be able to rely on his user agent to remember values he has
   entered for that control.</p>
 
+  <p>The <span
+  title="attr-input-autocomplete-default-state">default</span> state
+  indicates that the user agent is to use the <code
+  title="attr-form-autocomplete">autocomplete</code> attribute on the
+  element's <span>form owner</span> instead.</p>
+
+  <p>Each <code>input</code> element has a <dfn>resulting
+  autocompletion state</dfn>, which is either <i title="">on</i> or <i
+  title="">off</i>.</p>
+
   <p>When an <code>input</code> element's <code
   title="attr-input-autocomplete">autocomplete</code> attribute is in
   the <span title="attr-input-autocomplete-on-state">on</span> state,
-  the user agent may store the value entered by the user so that if
-  the user returns to the page, the UA can prefill the form. When an
+  when an <code>input</code> element's <code
+  title="attr-input-autocomplete">autocomplete</code> attribute is in
+  the <span
+  title="attr-input-autocomplete-default-state">default</span> state,
+  and the element has no <span>form owner</span>, and when an
   <code>input</code> element's <code
   title="attr-input-autocomplete">autocomplete</code> attribute is in
-  the <span title="attr-input-autocomplete-off-state">off</span>
-  state, the user agent should not remember the control's <span
+  the <span
+  title="attr-input-autocomplete-default-state">default</span> state,
+  and the element's <span>form owner</span>'s <code
+  title="attr-form-autocomplete">autocomplete</code> attribute is in
+  the <span title="attr-form-autocomplete-on-state">on</span> state,
+  the <code>input</code> element's <span>resulting autocompletion
+  state</span> is <i title="">on</i>. Otherwise, the
+  <code>input</code> element's <span>resulting autocompletion
+  state</span> is <i title="">off</i>.</p>
+
+  <p>When an <code>input</code> element's <span>resulting
+  autocompletion state</span> is <i title="">on</i>, the user agent
+  may store the value entered by the user so that if the user returns
+  to the page, the UA can prefill the form. Otherwise, the user agent
+  should not remember the control's <span
   title="concept-fe-value">value</span>.</p>
 
   <p>The autocompletion mechanism must be implemented by the user
@@ -31176,17 +31227,14 @@
 
   </div>
 
-  <p>A user agent may allow the user to disable support for this
-  attribute's <span
-  title="attr-input-autocomplete-off-state">off</span> state (causing
-  the attribute to always be in the <span
-  title="attr-input-autocomplete-on-state">on</span> state and always
-  allowing values to be remembered and prefilled). Support for the
-  <span title="attr-input-autocomplete-off-state">off</span> state
-  should be enabled by default, and the ability to disable support
-  should not be trivially accessible, as there are significant
-  security implications for the user if support for this attribute is
-  disabled.</p>
+  <p>A user agent may allow the user to override the <span>resulting
+  autocompletion state</span> and set it to always <i title="">on</i>,
+  always allowing values to be remembered and prefilled), or always <i
+  title="">off</i>, never remembering values. However, the ability to
+  override the <span>resulting autocompletion state</span> to <i
+  title="">on</i> should not be trivially accessible, as there are
+  significant security implications for the user if all values are
+  always remembered, regardless of the site's preferences.</p>
 
 
 

|