HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2274WF2: <input type=file> and some editorial fallout.2008-10-03 07:32
@@ -25584,21 +25584,21 @@ function AddCloud(data, x, y) { ... }</pre>
      <td> <span title="attr-input-type-checkbox">Checkbox</span>
      <td> A set of zero or more values from a predefined list
      <td> A checkbox
     <tr>
      <td> <dfn title="attr-input-type-radio-keyword"><code>radio</code></dfn>
      <td> <span title="attr-input-type-radio">Radio Button</span>
      <td> An enumerated value
      <td> A radio button
     <tr>
      <td> <dfn title="attr-input-type-file-keyword"><code>file</code></dfn>
-     <td> <span title="attr-input-type-file">File</span>
+     <td> <span title="attr-input-type-file">File Upload</span>
      <td> Zero or more files each with a MIME type and optionally a file name
      <td> A label and a button
     <tr>
      <td> <dfn title="attr-input-type-submit-keyword"><code>submit</code></dfn>
      <td> <span title="attr-input-type-submit">Submit Button</span>
      <td> An enumerated value, with the extra semantic that it must be the last value selected and initiates form submission
      <td> A button
     <tr>
      <td> <dfn title="attr-input-type-image-keyword"><code>image</code></dfn>
      <td> <span title="attr-input-type-image">Image Button</span>
@@ -25662,21 +25662,21 @@ function AddCloud(data, x, y) { ... }</pre>
      <th> <span><span title="attr-input-type-datetime">Date and Time</span>,</span>
           <span><span title="attr-input-type-date">Date</span>,</span>
           <span><span title="attr-input-type-month">Month</span>,</span>
           <span><span title="attr-input-type-week">Week</span>,</span>
           <span><span title="attr-input-type-time">Time</span></span>
      <th> <span><span title="attr-input-type-datetime-local">Local Date and Time</span>,</span>
           <span><span title="attr-input-type-number">Number</span></span>
      <th> <span><span title="attr-input-type-range">Range</span></span>
      <th> <span><span title="attr-input-type-checkbox">Checkbox</span>,</span>
           <span><span title="attr-input-type-radio">Radio Button</span></span>
-     <th> <span><span title="attr-input-type-file">File</span></span>
+     <th> <span><span title="attr-input-type-file">File Upload</span></span>
      <th> <span><span title="attr-input-type-submit">Submit Button</span></span>
      <th> <span><span title="attr-input-type-image">Image Button</span></span>
      <th> <span><span title="attr-input-type-reset">Reset Button</span>,</span>
           <span><span title="attr-input-type-button">Button</span></span>
 
    <tbody>
     <tr>
      <th> <code title="attr-input-accept">accept</code>
      <td class="no"> &middot; <!-- Hidden -->
      <td class="no"> &middot; <!-- Text -->
@@ -26273,23 +26273,23 @@ function AddCloud(data, x, y) { ... }</pre>
      <td class="no"> &middot; <!-- Image Button -->
      <td class="no"> &middot; <!-- Reset Button -->
 <!-- <td class="no"> &middot;      Button -->
 
   </table>
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute changes state, and
   when the element is first created, the element's rendering and
   behaviour must change to the new state's accordingly and the
-  <dfn>value sanitization algorithm</dfn> defined for the <code
-  title="attr-input-type">type</code> attribute's new state must be
-  invoked.</p>
+  <dfn>value sanitization algorithm</dfn>, if one is defined for the
+  <code title="attr-input-type">type</code> attribute's new state,
+  must be invoked.</p>
 
   <p>Each <code>input</code> element has a <span
   title="concept-fe-value">value</span>, which is exposed by the <code
   title="dom-input-value">value</code> DOM attribute. Some states
   define an <dfn title="concept-input-value-string-number">algorithm
   to convert a string to a number</dfn>, an <dfn
   title="concept-input-value-number-string">algorithm to convert a
   number to a string</dfn>, an <dfn
   title="concept-input-value-string-date">algorithm to convert a
   string to a <code>Date</code> object</dfn>, and an <dfn
@@ -26314,22 +26314,22 @@ function AddCloud(data, x, y) { ... }</pre>
 
   <p>The <dfn title="attr-input-value"><code>value</code></dfn>
   content attribute gives the default <span
   title="concept-fe-value">value</span> of the <code>input</code>
   element. When the <code title="attr-input-value">value</code>
   content attribute is added, set, or removed, if the control does not
   have a <i title="concept-input-value-dirty">dirty value</i>, the
   user agent must set the <span title="concept-fe-value">value</span>
   of the element to the value of the <code
   title="attr-input-value">value</code> content attribute, if there is
-  one, or the empty string otherwise, and run the <span>value
-  sanitization algorithm</span>.</p>
+  one, or the empty string otherwise, and then run the current
+  <span>value sanitization algorithm</span>, if one is defined.</p>
 
   <p>Each <code>input</code> element has a <span
   title="concept-fe-checked">checkedness</span>, which is exposed by
   the <code title="dom-input-checked">checked</code> DOM
   attribute.</p>
 
   <p>Each <code>input</code> element has a boolean <dfn
   title="concept-input-checked-dirty-flag">dirty checkedness
   flag</dfn>. When it is true, the element is said to have a <dfn
   title="concept-input-checked-dirty"><i>dirty
@@ -26360,22 +26360,23 @@ function AddCloud(data, x, y) { ... }</pre>
   algorithm</span> for <code>input</code> elements is to set the <span
   title="concept-input-value-dirty-flag">dirty value flag</span> and
   <span title="concept-input-checked-dirty-flag">dirty checkedness
   flag</span> back to false, set the <span
   title="concept-fe-value">value</span> of the element to the value of
   the <code title="attr-input-value">value</code> content attribute,
   if there is one, or the empty string otherwise, set the <span
   title="concept-fe-checked">checkedness</span> of the element to true
   if the element has a <code title="attr-input-checked">checked</code>
   content attribute and false if it does not, and then invoke the
-  <span>value sanitization algorithm</span> defined for the <code
-  title="attr-input-type">type</code> attribute's current state.</p>
+  <span>value sanitization algorithm</span>, if the <code
+  title="attr-input-type">type</code> attribute's current state
+  defines one.</p>
 
   <p>Each <code>input</code> element has a boolean <dfn
   title="concept-input-mutability">mutability flag</dfn>. When it is
   true, the element is said to be <dfn
   title="concept-input-mutable"><i>mutable</i></dfn>, and when it is
   false the element is <dfn
   title="concept-input-immutable"><i>immutable</i></dfn>. Unless
   otherwise specified, an <code>input</code> element is always <i
   title="concept-input-mutable">mutable</i>. Unless otherwise
   specified, the user agent should not allow the user to modify the
@@ -26463,23 +26464,20 @@ function AddCloud(data, x, y) { ... }</pre>
   this section apply.</p>
 
   <p>The <code>input</code> element represents a value that is not
   intended to be examined or manipulated by the user.</p>
 
   <p><strong>Constraint validation:</strong> If an <code>input</code>
   element's <code title="attr-input-type">type</code> attribute is in
   the <span title="attr-input-type-hidden">Hidden</span> state, it is
   <span>barred from constraint validation</span>.</p>
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p>If the <code title="attr-input-value">name</code> attribute is
   present and has a value that is a <span>case-sensitive</span> match
   for the string "<code title="">_charset_</code>", then the element's
   <code title="attr-input-value">value</code> attribute must be
   omitted.</p>
 
   <p>The 
   <code title="dom-input-value">value</code>
   DOM attribute applies to this element and is
   in mode <span title="dom-input-value-value">value</span>.</p>
@@ -27799,23 +27797,20 @@ function AddCloud(data, x, y) { ... }</pre>
   the user should allow the user to toggle the <span
   title="concept-fe-checked">checkedness</span> state.</p>
 
   <p><strong>Constraint validation:</strong> If the element is <i
   title="concept-input-required">required</i> and its <span
   title="concept-fe-checkedness">checkedness</span> is false, then the
   element is <span>suffering from being missing</span>.</p>
 
   <!-- XXX event timing; activation behavior -->
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p>The following common <code>input</code> element content
   attributes and DOM attributes apply to the element:
   <code title="attr-input-checked">checked</code>, and
   <code title="attr-input-required">required</code> content attributes;
   <code title="dom-input-checked">checked</code> and
   <code title="dom-input-value">value</code> DOM attributes.</p>
 
   <p>The <code title="dom-input-value">value</code> DOM attribute is
   in mode <span title="dom-input-value-default-on">default/on</span>.</p>
 
@@ -27919,23 +27914,20 @@ function AddCloud(data, x, y) { ... }</pre>
 
   <p><strong>Constraint validation:</strong> If the element is <i
   title="concept-input-required">required</i> and all of the
   <code>input</code> elements in the <i>radio button group</i> have a
   <span title="concept-fe-checkedness">checkedness</span> that is
   false, then the element is <span>suffering from being
   missing</span>.</p>
 
   <!-- XXX event timing; activation behavior -->
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p>The following common <code>input</code> element content
   attributes and DOM attributes apply to the element:
   <code title="attr-input-checked">checked</code> and
   <code title="attr-input-required">required</code> content attributes;
   <code title="dom-input-checked">checked</code> and
   <code title="dom-input-value">value</code> DOM attributes.</p>
 
   <p>The <code title="dom-input-value">value</code> DOM attribute is
   in mode <span title="dom-input-value-default-on">default/on</span>.</p>
 
@@ -27962,31 +27954,48 @@ function AddCloud(data, x, y) { ... }</pre>
   <code class="no-backref" title="dom-input-list">list</code>,
   <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
   <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> and
   <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
   <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
   <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
 
 
 
 
-  <h6><dfn title="attr-input-type-file">File</dfn> state</h6>
+  <h6><dfn title="attr-input-type-file">File Upload</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
-  title="attr-input-type-file">File</span> state, the rules in this
+  title="attr-input-type-file">File Upload</span> state, the rules in this
   section apply.</p>
 
-  <p class="XXX">...</p>
+  <p>The <code>input</code> element represents a list of <dfn
+  title="concept-input-type-file-selected">selected files</dfn>, each
+  file consisting of a file name, a file type, and a file body (the
+  contents of the file).</p>
 
-  <p>The element's <code title="attr-input-value">value</code>
-  attribute must be omitted.</p>
+  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  the user should allow the user to change the files on the list,
+  e.g. adding or removing files. Files can be from the filesystem or
+  created on the fly, e.g. a picture taken from a camera connected to
+  the user's device.</p>
+
+  <p><strong>Constraint validation:</strong> If the element is <i
+  title="concept-input-required">required</i> and the list of <span
+  title="concept-input-type-file-selected">selected files</span> is
+  empty, then the element is <span>suffering from being
+  missing</span>.</p>
+
+  <p>There must be no more than one file in the list of <span
+  title="concept-input-type-file-selected">selected files</span>.</p>
+
+  <hr>
 
   <p>The <dfn title="attr-input-accept"><code>accept</code></dfn>
   attribute may be specified to provide user agents with a hint of
   what file types the server will be able to accept.</p>
 
   <p>If specified, the attribute must consist of a <span>set of
   comma-separated tokens</span>, each of which must be an <span>ASCII
   case-insensitive</span> match for one of the following:</p>
 
   <dl>
@@ -28002,33 +28011,63 @@ function AddCloud(data, x, y) { ... }</pre>
    <dt>The string <code title="">image/*</code></dt>
 
    <dd>Indicates that image files are accepted.</dd>
 
    <dt>A valid MIME type, with no parameters</dt>
 
    <dd>Indicates that files of the specified type are accepted. <a href="#refsRFC2046">RFC[2046]</a></dd>
 
   </dl>
 
-  <p>The values must not be <span>ASCII case-insensitive</span>
-  matches for any of the other values (i.e. duplicates are not
+  <p>The tokens must not be <span>ASCII case-insensitive</span>
+  matches for any of the other tokens (i.e. duplicates are not
   allowed).</p>
 
-  <!-- XXX the selected file(s) must either have the given types or be of the given category -->
+  <p>User agents should prevent the user from selecting files that are
+  not accepted by one (or more) of these tokens.</p>
 
-  <p class="XXX">... list of <dfn title="concept-input-type-file-selected">selected files</dfn></p>
+  <hr>
+
+  <p>The following common <code>input</code> element content
+  attributes apply to the element:
+  <code title="attr-input-accept">accept</code> and
+  <code title="attr-input-required">required</code>.</p>
+
+  <p>The following content attributes must not be specified and do not
+  apply to the element:
+  <code class="no-backref" title="attr-fs-action">action</code>,
+  <code class="no-backref" title="attr-input-alt">alt</code>,
+  <code class="no-backref" title="attr-input-autocomplete">autocomplete</code>,
+  <code class="no-backref" title="attr-input-checked">checked</code>,
+  <code class="no-backref" title="attr-fs-enctype">enctype</code>,
+  <code class="no-backref" title="attr-input-list">list</code>,
+  <code class="no-backref" title="attr-input-max">max</code>,
+  <code class="no-backref" title="attr-input-maxlength">maxlength</code>,
+  <code class="no-backref" title="attr-fs-method">method</code>,
+  <code class="no-backref" title="attr-input-min">min</code>,
+  <code class="no-backref" title="attr-input-pattern">pattern</code>,
+  <code class="no-backref" title="attr-input-readonly">readonly</code>,
+  <code class="no-backref" title="attr-input-size">size</code>,
+  <code class="no-backref" title="attr-input-src">src</code>,
+  <code class="no-backref" title="attr-input-step">step</code>, and
+  <code class="no-backref" title="attr-fs-target">target</code>.</p>
+
+  <p>The following DOM attributes and methods do not apply to the element:
+  <code class="no-backref" title="dom-input-checked">checked</code>,
+  <code class="no-backref" title="dom-input-list">list</code>,
+  <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
+  <code class="no-backref" title="dom-input-value">value</code>,
+  <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> and
+  <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
+  <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
+  <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
 
-  <p><strong>Constraint validation:</strong> If the element is <i
-  title="concept-input-required">required</i> and the list of <span
-  title="concept-input-type-file-selected">selected files</span> is
-  empty, then the element is <span>suffering from being
-  missing</span>.</p>
 
 
 
   <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 is in the <span
   title="attr-input-type-submit">Submit Button</span> state, the rules
   in this section apply.</p>
 
@@ -28041,23 +28080,20 @@ function AddCloud(data, x, y) { ... }</pre>
   <p>If the element is <i title="concept-input-mutable">mutable</i>,
   the user should allow the user to activate the element.</p>
 
   <!-- XXX event timing; activation behavior -->
 
   <p>When the element is activated, if the element has a <span>form
   owner</span>, the element must <span
   title="concept-form-submit">submit</span> the <span>form
   owner</span> from the <code>input</code> element.</p>
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p>The following common <code>input</code> element content
   attributes and DOM attributes apply to the element:
   <code title="attr-fs-action">action</code>,
   <code title="attr-fs-enctype">enctype</code>,
   <code title="attr-fs-method">method</code>, and
   <code title="attr-fs-target">target</code> content attributes;
   <code title="dom-input-value">value</code> DOM attribute.</p>
 
   <p>The <code title="dom-input-value">value</code> DOM attribute is
   in mode <span title="dom-input-value-default">default</span>.</p>
@@ -28126,23 +28162,20 @@ function AddCloud(data, x, y) { ... }</pre>
   <p>If the element is <i title="concept-input-mutable">mutable</i>,
   the user should allow the user to activate the element.</p>
 
   <!-- XXX event timing; activation behavior -->
 
   <p>When the element is activated, if the element has a <span>form
   owner</span>, the element must <span
   title="concept-form-reset">reset</span> the <span>form
   owner</span>.</p>
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p><strong>Constraint validation:</strong> The element is
   <span>barred from constraint validation</span>.</p>
 
   <p>The <code title="dom-input-value">value</code> DOM attribute
   applies to this element and is in mode <span
   title="dom-input-value-default">default</span>.</p>
 
   <p>The following content attributes must not be specified and do not
   apply to the element:
   <code class="no-backref" title="attr-input-accept">accept</code>,
@@ -28186,23 +28219,20 @@ function AddCloud(data, x, y) { ... }</pre>
   default behavior. If the element has a <code
   title="attr-input-value">value</code> attribute, the button's label
   must be the value of that attribute; otherwise, it must be the empty
   string.</p>
 
   <p>If the element is <i title="concept-input-mutable">mutable</i>,
   the user should allow the user to activate the element.</p>
 
   <!-- XXX event timing; activation behavior -->
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows:</strong> Do nothing.</p>
-
   <p><strong>Constraint validation:</strong> The element is
   <span>barred from constraint validation</span>.</p>
 
   <p>The <code title="dom-input-value">value</code> DOM attribute
   applies to this element and is in mode <span
   title="dom-input-value-default">default</span>.</p>
 
   <p>The following content attributes must not be specified and do not
   apply to the element:
   <code class="no-backref" title="attr-input-accept">accept</code>,
@@ -28578,22 +28608,23 @@ function AddCloud(data, x, y) { ... }</pre>
   <dl>
 
    <dt><dfn title="dom-input-value-value">value</dfn>
 
    <dd>On getting, it must return the current <span
    title="concept-fe-value">value</span> of the element. On setting,
    it must set the element's <span
    title="concept-fe-value">value</span> to the new value, set the
    element's <span title="concept-input-value-dirty-flag">dirty value
    flag</span> to true, and then invoke the <span>value sanitization
-   algorithm</span> defined for the element's <code
-   title="attr-input-type">type</code> attribute's current state.</dd>
+   algorithm</span>, if the element's <code
+   title="attr-input-type">type</code> attribute's current state
+   defines one.</dd>
 
    <dt><dfn title="dom-input-value-default">default</dfn>
 
    <dd>On getting, if the element has a <code
    title="attr-input-value">value</code> attribute, it must return
    that attribute's value; otherwise, it must return the empty
    string. On setting, it must set the element's <code
    title="attr-input-value">value</code> attribute to the new
    value.</dd>
 
@@ -29365,21 +29396,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
   <p class="XXX">... <dfn title="attr-fs-target">target</dfn> content attribute</p>
 
   <p class="XXX">... <dfn title="dom-fs-target">target</dfn> DOM attribute</p>
 
   <p class="XXX">... <dfn title="concept-fs-target">target</dfn> if present else form's else base target else default</p> <!-- c.f. hyperlink following -->
 
   <p>Attributes for form submission can be specified both on
   <code>form</code> elements and on elements that represent buttons
   that submit forms, e.g. an <code>input</code> element whose <code
   title="attr-input-type">type</code> attribute is in the <span
-  title="attr-input-type-submit-state">Submit Button</span> state. The
+  title="attr-input-type-submit">Submit Button</span> state. The
   attributes on the buttons, when omitted, default to the values given
   on the corresponding the <code>form</code> element.</p>
   
 
 
   <h4>Constraints</h4>
 
   <h5>Definitions</h5>
 
   <p>A <span title="category-listed">listed form-associated
@@ -29614,35 +29645,35 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
        <li>The <var title="">field</var> element is an
        <code>input</code> element whose <code
        title="attr-input-type">type</code> attribute is in the <span
        title="attr-input-type-radio">Radio Button</span> state and
        whose <span title="concept-fe-checked">checkedness</span> is
        false.</li>
 
        <li>The <var title="">field</var> element is an
        <code>input</code> element whose <code
        title="attr-input-type">type</code> attribute is in the <span
-       title="attr-input-type-file-state">File Upload</span> state but
+       title="attr-input-type-file">File Upload</span> state but
        the control does not have any files selected.</li>
 
       </ul>
 
       <p>Otherwise, process <var title="">field</var> as follows:</p>
 
      </li>
 
      <li>
 
       <p>If the <var title="">field</var> element is an
       <code>input</code> element whose <code
       title="attr-input-type">type</code> attribute is in the <span
-      title="attr-input-type-image-state">Image Button</span> state,
+      title="attr-input-type-image">Image Button</span> state,
       then run these further nested substeps:</p>
 
       <ol>
 
        <li><p>If the <var title="">field</var> element has an <code
        title="attr-fe-name">name</code> attribute specified and value
        is not the empty string, let <var title="">name</var> be that
        value followed by a single U+002E FULL STOP (.)
        character. Otherwise, let <var title="">name</var> be the empty
        string.</p></li>
@@ -29728,27 +29759,27 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
        with <var title="">name</var> as the name and <var
        title="">value</var> as the value.</p></li>
 
       </ol>
 
      </li>
 
      <li><p>Otherwise, if the <var title="">field</var> element is an
      <code>input</code> element whose <code
      title="attr-input-type">type</code> attribute is in the <span
-     title="attr-input-type-file-state">File Upload</span> state, then
-     for each file <span
+     title="attr-input-type-file">File Upload</span> state, then for
+     each file <span
      title="concept-input-type-file-selected">selected</span> in the
      <code>input</code> element, append an entry in the <var
      title="">form data set</var> with the <var title="">name</var> as
-     the name and the file as the value. (Both the file name and the
-     file contents are subsequently used.)</p></li>
+     the name and the file (consisting of the name, the type, and the
+     body) as the value.</p></li>
 
      <li><p>Otherwise, append an entry in the <var title="">form data
      set</var> with <var title="">name</var> as the name and the <span
      title="concept-fe-value">value</span> of the <var
      title="">field</var> element as the value.</p></li>
 
     </ol>
 
    </li>
 

|