Short URL: http://html5.org/r/2192
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2192 | WF2: <input type=''>. Also, some minor fixes relating to <label>. | 2008-09-16 20:48 |
Index: source
===================================================================
--- source (revision 2191)
+++ source (revision 2192)
@@ -24317,7 +24317,7 @@
attribute float <span title="dom-input-valueAsNumber">valueAsNumber</span>;
readonly attribute <span>HTMLOptionElement</span> <span title="dom-input-selectedOption">selectedOption</span>;
- readonly attribute <span>HTMLCollection</span> <span title="dom-lfe-labels">labels</span>;
+ readonly attribute <span>NodeList</span> <span title="dom-lfe-labels">labels</span>;
void <span title="dom-input-stepUp">stepUp</span>(in int n);
void <span title="dom-input-stepDown">stepDown</span>(in int n);
@@ -24333,6 +24333,126 @@
<!-- XXX add selectionStart and company -->
+ <p>The <code>input</code> element represents a typed data field,
+ usually with a form control to allow the user to edit the data.</p>
+
+ <p>The <dfn title="attr-input-type"><code>type</code></dfn>
+ attribute controls the data type (and associated control) of the
+ element. It is an <span>enumerated attribute</span>. The following
+ table lists the keywords and states for the attribute — the
+ keywords in the left column map to the states in the cell in the
+ second column on the same row as the keyword.</p>
+
+ <table>
+ <thead>
+ <tr>
+ <th> Keyword
+ <th> State
+ <th> Data type
+ <th> Control type
+ <tbody>
+ <tr>
+ <td> <dfn title="attr-input-type-text-keyword"><code>text</code></dfn>
+ <td> <span title="attr-input-type-text">Text</span> state
+ <td> Text with no line breaks
+ <td> Text field
+ <tr>
+ <td> <dfn title="attr-input-type-password-keyword"><code>password</code></dfn>
+ <td> <span title="attr-input-type-password">Password</span> state
+ <td> Text with no line breaks (sensitive information)
+ <td> Text field that obscures data entry
+ <tr>
+ <td> <dfn title="attr-input-type-image-keyword"><code>image</code></dfn>
+ <td> <span title="attr-input-type-image">Image Button</span> state
+ <td> A coordinate, relative to a particular image's size, with the extra semantic that it must be the last value selected and initiates form submission
+ <td> Either a clickable image, or a button
+ <tr>
+ <td> <dfn title="attr-input-type-datetime-keyword"><code>datetime</code></dfn>
+ <td> <span title="attr-input-type-datetime">Date and Time</span> state
+ <td> A date and time (year, month, day, hour, minute, second, fractions of a second) with the time zone set to UTC
+ <td> A date and time control
+ <tr>
+ <td> <dfn title="attr-input-type-datetime-local-keyword"><code>datetime-local</code></dfn>
+ <td> <span title="attr-input-type-datetime-local">Local Date and Time</span> state
+ <td> A date and time (year, month, day, hour, minute, second, fractions of a second) with no time zone
+ <td> A date and time control
+ <tr>
+ <td> <dfn title="attr-input-type-date-keyword"><code>date</code></dfn>
+ <td> <span title="attr-input-type-date">Date</span> state
+ <td> A date (year, month, day) with no time zone
+ <td> A date control
+ <tr>
+ <td> <dfn title="attr-input-type-month-keyword"><code>month</code></dfn>
+ <td> <span title="attr-input-type-month">Month</span> state
+ <td> A date consisting of a year and a month with no time zone
+ <td> A month control
+ <tr>
+ <td> <dfn title="attr-input-type-week-keyword"><code>week</code></dfn>
+ <td> <span title="attr-input-type-week">Week</span> state
+ <td> A date consisting of a year and a week number with no time zone
+ <td> A week control
+ <tr>
+ <td> <dfn title="attr-input-type-time-keyword"><code>time</code></dfn>
+ <td> <span title="attr-input-type-time">Time</span> state
+ <td> A time (hour, minute, seconds, fractional seconds) with no time zone
+ <td> A time control
+ <tr>
+ <td> <dfn title="attr-input-type-number-keyword"><code>number</code></dfn>
+ <td> <span title="attr-input-type-number">Number</span> state
+ <td> A numerical value
+ <td> A text field or spinner control
+ <tr>
+ <td> <dfn title="attr-input-type-range-keyword"><code>range</code></dfn>
+ <td> <span title="attr-input-type-range">Range</span> state
+ <td> A numerical value, with the extra semantic that the exact value is not important
+ <td> A slider control or similar
+ <tr>
+ <td> <dfn title="attr-input-type-email-keyword"><code>email</code></dfn>
+ <td> <span title="attr-input-type-email">E-mail</span> state
+ <td> An e-mail address
+ <td> A text field
+ <tr>
+ <td> <dfn title="attr-input-type-url-keyword"><code>url</code></dfn>
+ <td> <span title="attr-input-type-url">URL</span> state
+ <td> An IRI
+ <td> A text field
+ <tr>
+ <td> <dfn title="attr-input-type-checkbox-keyword"><code>checkbox</code></dfn>
+ <td> <span title="attr-input-type-checkbox">Checkbox</span> state
+ <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> state
+ <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> state
+ <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-hidden-keyword"><code>hidden</code></dfn>
+ <td> <span title="attr-input-type-hidden">Hidden</span> state
+ <td> An arbitrary string
+ <td> n/a
+ <tr>
+ <td> <dfn title="attr-input-type-submit-keyword"><code>submit</code></dfn>
+ <td> <span title="attr-input-type-submit">Submit Button</span> state
+ <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-reset-keyword"><code>reset</code></dfn>
+ <td> <span title="attr-input-type-reset">Reset Button</span> state
+ <td> n/a
+ <td> A button
+ <tr>
+ <td> <dfn title="attr-input-type-button-keyword"><code>button</code></dfn>
+ <td> <span title="attr-input-type-button">Button</span> state
+ <td> n/a
+ <td> A button
+ </table>
+
<p class="big-issue">...</p>
<p>The <code title="attr-fae-form">form</code> attribute is used to
@@ -24397,7 +24517,7 @@
attribute DOMString <span title="dom-button-type">type</span>;
attribute DOMString <span title="dom-button-value">value</span>;
- readonly attribute <span>HTMLCollection</span> <span title="dom-lfe-labels">labels</span>;
+ readonly attribute <span>NodeList</span> <span title="dom-lfe-labels">labels</span>;
readonly attribute boolean <span title="dom-cva-willValidate">willValidate</span>;
readonly attribute <span>ValidityState</span> <span title="dom-cva-validity">validity</span>;
@@ -24464,7 +24584,7 @@
attribute long <span title="dom-select-selectedIndex">selectedIndex</span>;
attribute DOMString <span title="dom-select-value">value</span>;
- readonly attribute <span>HTMLCollection</span> <span title="dom-lfe-labels">labels</span>;
+ readonly attribute <span>NodeList</span> <span title="dom-lfe-labels">labels</span>;
void <span title="dom-select-add">add</span>(in <span>HTMLElement</span> element, in <span>HTMLElement</span> before);
void <span title="dom-select-remove">remove</span>(in long index);
@@ -24639,7 +24759,7 @@
attribute DOMString <span title="dom-textarea-defaultValue">defaultValue</span>;
attribute DOMString <span title="dom-textarea-value">value</span>;
- readonly attribute <span>HTMLCollection</span> <span title="dom-lfe-labels">labels</span>;
+ readonly attribute <span>NodeList</span> <span title="dom-lfe-labels">labels</span>;
readonly attribute boolean <span title="dom-cva-willValidate">willValidate</span>;
readonly attribute <span>ValidityState</span> <span title="dom-cva-validity">validity</span>;
@@ -29653,14 +29773,16 @@
label the button itself if the attribute is absent.</p>
<p>Otherwise, the <span title="command-facet-Type">Type</span> is
- "radio" or "checkbox". If the element has a <code>label</code>
- element associated with it, the <code>textContent</code> of the
- first such element is the <span
+ "radio" or "checkbox". If the element is a <span>labeled
+ control</span>, the <code title="">textContent</code> of the first
+ <code>label</code> element in <span>tree order</span> whose
+ <span>labeled control</span> is the element in question is the <span
title="command-facet-Label">Label</span> (in DOM terms, this the
- string given by
- <code><var title="">element</var>.labels[0].textContent</code>). Otherwise,
- the value of the <code>value</code> attribute, if present, is the
- <span title="command-facet-Label">Label</span>. Otherwise, the <span
+ string given by <code><var
+ title="">element</var>.labels[0].textContent</code>). Otherwise,
+ the value of the <code title="attr-input-value">value</code>
+ attribute, if present, is the <span
+ title="command-facet-Label">Label</span>. Otherwise, the <span
title="command-facet-Label">Label</span> is the empty string.</p>
<p>The <span title="command-facet-Hint">Hint</span> of the command
@@ -49913,6 +50035,8 @@
<dt>A start tag whose tag name is "label"</dt>
<dd>
+ <!-- XXX should this close open <label> elements? -->
+
<p><span>Reconstruct the active formatting elements</span>, if
any.</p>