HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2202WF2: Restructure the <input> section to allow for attributes to be defined once instead of multiple times. Define autocomplete=''.2008-09-17 01:17
@@ -24456,50 +24456,44 @@ function AddCloud(data, x, y) { ... }</pre>
   title="attr-input-type-text">Text</span> state.</p>
 
   <p>The <code title="attr-fae-form">form</code> attribute is used to
   explicitly associate the <code>input</code> element with its
   <span>form owner</span>. The <code title="attr-fe-name">name</code>
   attribute represents the element's name. The <code
   title="attr-fe-disabled">disabled</code> attribute is used to make
   the control non-interactive and to prevent its value from being
   submitted.</p>
 
-  <p class="big-issue">... <dfn title="attr-input-autofocus"><code>autofocus</code></dfn></p>
-
-  <p>The semantics and processing rules of the <dfn
-  title="attr-input-accept"><code>accept</code></dfn>, <dfn
-  title="attr-input-alt"><code>alt</code></dfn>, <dfn
-  title="attr-input-autocomplete"><code>autocomplete</code></dfn>,
-  <dfn title="attr-input-checked"><code>checked</code></dfn>, <dfn
-  title="attr-input-inputmode"><code>inputmode</code></dfn>, <dfn
-  title="attr-input-list"><code>list</code></dfn>, <dfn
-  title="attr-input-max"><code>max</code></dfn>, <dfn
-  title="attr-input-maxlength"><code>maxlength</code></dfn>, <dfn
-  title="attr-input-min"><code>min</code></dfn>, <dfn
-  title="attr-input-pattern"><code>pattern</code></dfn>, <dfn
-  title="attr-input-readonly"><code>readonly</code></dfn>, <dfn
-  title="attr-input-required"><code>required</code></dfn>, <dfn
-  title="attr-input-size"><code>size</code></dfn>, <dfn
-  title="attr-input-src"><code>src</code></dfn>, <dfn
-  title="attr-input-step"><code>step</code></dfn>, and <dfn
-  title="attr-input-value"><code>value</code></dfn> attributes depend
-  on the state of the <code title="attr-input-type">type</code>
-  attribute, and are defined in the sections below.</p>
-
-  <p>The <code title="attr-fs-target">target</code>, <code
-  title="attr-fs-method">method</code>, <code
+  <p>Which of the <code title="attr-input-accept">accept</code>, <code
+  title="attr-fs-action">action</code>, <code
+  title="attr-input-alt">alt</code>, <code
+  title="attr-input-autocomplete">autocomplete</code>, <code
+  title="attr-input-autofocus">autofocus</code>, <code
+  title="attr-input-checked">checked</code>, <code
   title="attr-fs-enctype">enctype</code>, and <code
-  title="attr-fs-action">action</code> attributes are used in
-  <span>form submission</span> when the <code
-  title="attr-input-type">type</code> attribute is in one of the <span
-  title="attr-input-type-submit">Submit Button</span> or <span
-  title="attr-input-type-image">Image Button</span> states.</p>
+  title="attr-input-inputmode">inputmode</code>, <code
+  title="attr-input-list">list</code>, <code
+  title="attr-input-max">max</code>, <code
+  title="attr-input-maxlength">maxlength</code>, <code
+  title="attr-fs-method">method</code>, <code
+  title="attr-input-min">min</code>, <code
+  title="attr-input-pattern">pattern</code>, <code
+  title="attr-input-readonly">readonly</code>, <code
+  title="attr-input-required">required</code>, <code
+  title="attr-input-size">size</code>, <code
+  title="attr-input-src">src</code>, <code
+  title="attr-input-step">step</code>, <code
+  title="attr-fs-target">target</code>, and <code
+  title="attr-input-value">value</code> attributes apply to an
+  <code>input</code> element depends on the state of its <code
+  title="attr-input-type">type</code> attribute. They are defined
+  below.</p>
 
   <p>The <dfn title="dom-input-accept"><code>accept</code></dfn>, <dfn
   title="dom-input-alt"><code>alt</code></dfn>, <dfn
   title="dom-input-autocomplete"><code>autocomplete</code></dfn>, <dfn
   title="dom-input-autofocus"><code>autofocus</code></dfn>, <dfn
   title="dom-input-inputmode"><code>inputmode</code></dfn>, <dfn
   title="dom-input-max"><code>max</code></dfn>, <dfn
   title="dom-input-min"><code>min</code></dfn>, <dfn
   title="dom-input-pattern"><code>pattern</code></dfn>, <dfn
   title="dom-input-required"><code>required</code></dfn>, <dfn
@@ -24536,259 +24530,347 @@ function AddCloud(data, x, y) { ... }</pre>
   <code title="dom-cva-validity">validity</code>, and <code
   title="dom-cva-validationMessage">validationMessage</code>
   attributes, and the <code
   title="dom-cva-checkValidatity">checkValidity()</code> and
   <code
   title="dom-cva-setCustomValidity">setCustomValidity()</code>
   methods, are part of the <span>constraint validation API</span>.</p>
 
 
 
-  <h5><dfn title="attr-input-type-text">Text</dfn> state</h5>
+  <h5>States of the <code title="attr-input-type">type</code> attribute</h5>
+
+  <h6><dfn title="attr-input-type-text">Text</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute is absent, has the value <code title="attr-input-type-text-keyword">text</code>,
   or has an invalid value, it is in the <span
   title="attr-input-type-text">Text</span> state.</p>
 
-  <p class="big-issue">...
-  <code title="attr-input-autocomplete">autocomplete</code>
-  <code title="attr-input-inputmode">inputmode</code>
-  <code title="attr-input-list">list</code>
-  <code title="attr-input-maxlength">maxlength</code>
-  <code title="attr-input-pattern">pattern</code>
-  <code title="attr-input-readonly">readonly</code>
-  <code title="attr-input-required">required</code>
-  <code title="attr-input-size">size</code>
-  <code title="attr-input-value">value</code>
-  </p>
+  <p class="big-issue">...</p>
+
+  <p>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-text">Text</span> state, the following common
+  <code>input</code> element attributes apply to the element:
+  <code title="attr-input-autocomplete">autocomplete</code>,
+  <code title="attr-input-autofocus">autofocus</code>,
+  <code title="attr-input-inputmode">inputmode</code>,
+  <code title="attr-input-list">list</code>,
+  <code title="attr-input-maxlength">maxlength</code>,
+  <code title="attr-input-pattern">pattern</code>,
+  <code title="attr-input-readonly">readonly</code>,
+  <code title="attr-input-required">required</code>,
+  <code title="attr-input-size">size</code>, and
+  <code title="attr-input-value">value</code>.</p>
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-text">Text</span> state, the following
   attributes must not be specified:
   <code class="no-backref" title="attr-input-accept">accept</code>,
   <code class="no-backref" title="attr-input-alt">alt</code>,
   <code class="no-backref" title="attr-input-checked">checked</code>,
   <code class="no-backref" title="attr-input-max">max</code>,
   <code class="no-backref" title="attr-input-min">min</code>,
   <code class="no-backref" title="attr-input-src">src</code>,
   <code class="no-backref" title="attr-input-step">step</code>,
   <code class="no-backref" title="attr-fs-target">target</code>,
   <code class="no-backref" title="attr-fs-method">method</code>,
   <code class="no-backref" title="attr-fs-enctype">enctype</code>, and
   <code class="no-backref" title="attr-fs-action">action</code>.</p>
 
 
 
-  <h5><dfn title="attr-input-type-password">Password</dfn> state</h5>
+  <h6><dfn title="attr-input-type-password">Password</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-password-keyword">password</code>,
   it is in the <span title="attr-input-type-password">Password</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-image">Image Button</dfn> state</h5>
+  <h6><dfn title="attr-input-type-image">Image Button</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-image-keyword">image</code>,
   it is in the <span title="attr-input-type-image">Image Button</span> state.</p>
 
   <p class="big-issue">...</p>
 
   <p class="big-issue">... image: <dfn title="concept-input-type-image-coordinate">selected coordinate</dfn></p>
 
 
 
-  <h5><dfn title="attr-input-type-datetime">Date and Time</dfn> state</h5>
+  <h6><dfn title="attr-input-type-datetime">Date and Time</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-datetime-keyword">datetime</code>,
   it is in the <span title="attr-input-type-datetime">Date and Time</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-datetime-local">Local Date and Time</dfn> state</h5>
+  <h6><dfn title="attr-input-type-datetime-local">Local Date and Time</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-datetime-local-keyword">datetime-local</code>,
   it is in the <span title="attr-input-type-datetime-local">Local Date and Time</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-date">Date</dfn> state</h5>
+  <h6><dfn title="attr-input-type-date">Date</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-date-keyword">date</code>,
   it is in the <span title="attr-input-type-date">Date</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-month">Month</dfn> state</h5>
+  <h6><dfn title="attr-input-type-month">Month</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-month-keyword">month</code>,
   it is in the <span title="attr-input-type-month">Month</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-week">Week</dfn> state</h5>
+  <h6><dfn title="attr-input-type-week">Week</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-week-keyword">week</code>,
   it is in the <span title="attr-input-type-week">Week</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-time">Time</dfn> state</h5>
+  <h6><dfn title="attr-input-type-time">Time</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-time-keyword">time</code>,
   it is in the <span title="attr-input-type-time">Time</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-number">Number</dfn> state</h5>
+  <h6><dfn title="attr-input-type-number">Number</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-number-keyword">number</code>,
   it is in the <span title="attr-input-type-number">Number</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-range">Range</dfn> state</h5>
+  <h6><dfn title="attr-input-type-range">Range</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-range-keyword">range</code>,
   it is in the <span title="attr-input-type-range">Range</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-email">E-mail</dfn> state</h5>
+  <h6><dfn title="attr-input-type-email">E-mail</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-email-keyword">email</code>,
   it is in the <span title="attr-input-type-email">E-mail</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-url">URL</dfn> state</h5>
+  <h6><dfn title="attr-input-type-url">URL</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-url-keyword">url</code>,
   it is in the <span title="attr-input-type-url">URL</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-checkbox">Checkbox</dfn> state</h5>
+  <h6><dfn title="attr-input-type-checkbox">Checkbox</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-checkbox-keyword">checkbox</code>,
   it is in the <span title="attr-input-type-checkbox">Checkbox</span> state.</p>
 
   <p class="big-issue">...</p>
 
   <p class="big-issue">... <dfn title="concept-input-checked-checkbox">checked</dfn></p>
 
 
 
-  <h5><dfn title="attr-input-type-radio">Radio Button</dfn> state</h5>
+  <h6><dfn title="attr-input-type-radio">Radio Button</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-radio-keyword">radio</code>,
   it is in the <span title="attr-input-type-radio">Radio Button</span> state.</p>
 
   <p class="big-issue">...</p>
 
   <p class="big-issue">... <dfn title="concept-input-checked-radio">checked</dfn></p>
 
 
 
-  <h5><dfn title="attr-input-type-file">File</dfn> state</h5>
+  <h6><dfn title="attr-input-type-file">File</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-file-keyword">file</code>,
   it is in the <span title="attr-input-type-file">File</span> state.</p>
 
   <p class="big-issue">...</p>
 
   <p class="big-issue">... <dfn title="concept-input-type-file-selected">selected file</dfn></p>
 
 
 
-  <h5><dfn title="attr-input-type-hidden">Hidden</dfn> state</h5>
+  <h6><dfn title="attr-input-type-hidden">Hidden</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-hidden-keyword">hidden</code>,
   it is in the <span title="attr-input-type-hidden">Hidden</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-submit">Submit Button</dfn> state</h5>
+  <h6><dfn title="attr-input-type-submit">Submit Button</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-submit-keyword">submit</code>,
   it is in the <span title="attr-input-type-submit">Submit Button</span> state.</p>
 
   <p class="big-issue">...</p>
 
 <!--XXX
 rel="" on submit buttons?
 -->
 
 
 
-  <h5><dfn title="attr-input-type-reset">Reset Button</dfn> state</h5>
+  <h6><dfn title="attr-input-type-reset">Reset Button</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-reset-keyword">reset</code>,
   it is in the <span title="attr-input-type-reset">Reset Button</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
-  <h5><dfn title="attr-input-type-button">Button</dfn> state</h5>
+  <h6><dfn title="attr-input-type-button">Button</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code title="attr-input-type">type</code>
   attribute has the value <code title="attr-input-type-button-keyword">button</code>,
   it is in the <span title="attr-input-type-button">Button</span> state.</p>
 
   <p class="big-issue">...</p>
 
 
 
+  <h5>Common <code>input</code> element attributes</h5>
+
+  <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>
+
+  <!--XXX IE also applies it to <form> elements. It doesn't apply it
+  to <textarea>. -->
+ 
+  <p>The <dfn
+  title="attr-input-autocomplete"><code>autocomplete</code></dfn>
+  attribute is an enumerated attribute. The attribute has two
+  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>
+
+  <p>The <span title="attr-input-autocomplete-off-state">off</span>
+  state indicates that the control's input data is either
+  particularily 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 should therefore
+  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 particularily sensitive and the user should
+  expect to be able to rely on his UA to remember values he has
+  entered for that control.</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
+  <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 value.</p>
+  <!-- XXX xref value? -->
+
+  <p>This specification does not define the autocompletion mechanism.
+  User agents may implement any system within the conformance criteria
+  of this specification, taking into account security and privacy
+  concerns.</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>
+
+
+
+
 
   <h4>The <dfn><code>button</code></dfn> element</h4>
 
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
    <dd><span title="category-listed">Listed</span>, <span title="category-label">labelable</span>, and <span title="category-submit">submittable</span> <span>form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
@@ -25258,20 +25340,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
   <p class="big-issue">... <dfn title="concept-fe-disabled">disabled</dfn></p>
   <!-- XXX remember to check for a fieldset ancestor that has its
   disabled attribute set, and always be disabled if you find one -->
 
   <p class="big-issue">... <dfn title="attr-fe-disabled">disabled</dfn> content attribute</p>
 
   <p class="big-issue">... <dfn title="dom-fe-disabled">disabled</dfn> DOM attribute</p>
 
   <p class="big-issue">... <dfn title="concept-fe-value">value</dfn></p>
+  <!-- XXX autocomplete: define somewhere that the value may be set from a stored value -->
 
 
   <h4><dfn>Attributes for form submission</dfn></h4>
 
   <p class="big-issue">... <dfn title="attr-fs-action">action</dfn> content attribute</p>
 
   <p class="big-issue">... <dfn title="dom-fs-action">action</dfn> DOM attribute</p>
 
   <p class="big-issue">... <dfn title="concept-fs-action">action</dfn> if present else form's else default</p>
   <!-- XXX mozilla bug 297761 -->

|