HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2798Support <form autocomplete>2009-02-12 02:48
@@ -26928,31 +26928,33 @@ function AddCloud(data, x, y) { ... }</pre>
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
    <dd><span>Flow content</span>, but with no <code>form</code> element descendants.</dd>
    <dt>Content attributes:</dt>
    <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>
    <dd><code title="attr-fs-novalidate">novalidate</code></dd>
    <dd><code title="attr-fs-target">target</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">[Callable=<span title="dom-form-namedItem">namedItem</span>]
 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>;
            attribute boolean <span title="dom-fs-novalidate">novalidate</span>;
            attribute DOMString <span title="dom-fs-target">target</span>;
 
   readonly attribute <span>HTMLFormControlsCollection</span> <span title="dom-form-elements">elements</span>;
   readonly attribute long <span title="dom-form-length">length</span>;
   [IndexGetter] any <span title="dom-form-item">item</span>(in DOMString name);
   [NameGetter=OverrideBuiltins] any <span title="dom-form-namedItem">namedItem</span>(in DOMString name);
@@ -26980,32 +26982,58 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
   preferred name of an <span>ASCII-compatible character
   encoding</span>. <a href="#refsIANACHARSET">[IANACHARSET]</a></p>
 
   <p>The <dfn title="attr-form-name"><code>name</code></dfn> attribute
   represents the <code>form</code>'s name within the <code
   title="dom-forms">forms</code> collection. The value must not be the
   empty string, and the value must be unique amongst the
   <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
   title="attr-fs-novalidate">novalidate</code>, and <code
   title="attr-fs-target">target</code> attributes are <span>attributes
   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
   title="category-listed">listed</span> elements whose <span>form
   owner</span> is the <code>form</code> element, with the exception of
   <code>input</code> elements whose <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-image">Image Button</span> state, which must,
   for historical reasons, be excluded from this particular
@@ -31110,90 +31138,110 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
 
   <p>These attributes only apply to an <code>input</code> element if
   its <code title="attr-input-type">type</code> attribute is in a
   state whose definition declares that the attribute applies. When an
   attribute doesn't apply to an <code>input</code> element, user
   agents must <span>ignore</span> the attribute.</p>
 
 
   <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
   sensitive (for example the activation code for a nuclear weapon) or
   is a value that will never be reused (for example a one-time-key for
   a bank login) and the user will therefore have to explicitly enter
   the data each time, instead of being able to rely on the UA to
   prefill the value for him.</p>
 
   <p>Conversely, the <span
   title="attr-input-autocomplete-on-state">on</span> state indicates
   that the value is not particularly sensitive and the user can expect
   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
   agent acting as if the user had modified the element's <span
   title="concept-fe-value">value</span>, and must be done at a time
   where the element is <i title="concept-input-mutable">mutable</i>
   (e.g. just after the element has been inserted into the document, or
   when the user agent <span title="stop parsing">stops
   parsing</span>).</p>
 
   <div class="example">
 
    <p>Banks frequently do not want UAs to prefill login
    information:</p>
 
    <pre>&lt;p>Account: &lt;input type="text" name="ac" autocomplete="off">&lt;/p>
 &lt;p>PIN: &lt;input type="text" name="pin" autocomplete="off">&lt;/p></pre>
 
   </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>
 
 
 
   <h6>The <code title="attr-input-list">list</code> attribute</h6>
 
   <p>The <dfn title="attr-input-list"><code>list</code></dfn>
   attribute is used to identify an element that lists predefined
   options suggested to the user.</p>
 
   <p>If present, its value must be the ID of a <code>datalist</code>

|