HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2921Add placeholder= for <textarea>.2009-03-30 01:21
@@ -35684,20 +35684,22 @@ You cannot complete this form until the field is correct.</samp></pre>
   base</span> is not an integral multiple of the <span
   title="concept-input-step">allowed value step</span>, the element is
   <span>suffering from a step mismatch</span>.</p>
 
   </div>
 
 
 
   <h6>The <code title="attr-input-placeholder">placeholder</code> attribute</h6>
 
+  <!-- similar text in the <textarea> section -->
+
   <p>The <dfn
   title="attr-input-placeholder"><code>placeholder</code></dfn>
   attribute represents a <em>short</em> hint (a word or short phrase)
   intended to aid the user with data entry. A hint could be a sample
   value or a brief description of the expected format. The attribute,
   if specified, must have a value that contains no U+000A LINE FEED
   (LF) or U+000D CARRIAGE RETURN (CR) characters.</p>
 
   <p class="note">For a longer hint or other advisory text, the <code
   title="attr-title">title</code> attribute is more appropriate.</p>
@@ -37124,33 +37126,35 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
    <dt>Content model:</dt>
    <dd>Text.</dd>
    <dt>Content attributes:</dt>
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-fe-autofocus">autofocus</code></dd>
    <dd><code title="attr-textarea-cols">cols</code></dd>
    <dd><code title="attr-fe-disabled">disabled</code></dd>
    <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-textarea-maxlength">maxlength</code></dd>
    <dd><code title="attr-fe-name">name</code></dd>
+   <dd><code title="attr-textarea-placeholder">placeholder</code></dd>
    <dd><code title="attr-textarea-readonly">readonly</code></dd>
    <dd><code title="attr-textarea-required">required</code></dd>
    <dd><code title="attr-textarea-rows">rows</code></dd>
    <dd><code title="attr-textarea-wrap">wrap</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
            attribute boolean <span title="dom-fe-autofocus">autofocus</span>;
            attribute unsigned long <span title="dom-textarea-cols">cols</span>;
            attribute boolean <span title="dom-fe-disabled">disabled</span>;
   readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute long <span title="dom-textarea-maxLength">maxLength</span>;
            attribute DOMString <span title="dom-fe-name">name</span>;
+           attribute DOMString <span title="dom-textarea-placeholder">placeholder</span>;
            attribute boolean <span title="dom-textarea-readOnly">readOnly</span>;
            attribute boolean <span title="dom-textarea-required">required</span>;
            attribute unsigned long <span title="dom-textarea-rows">rows</span>;
            attribute DOMString <span title="dom-textarea-wrap">wrap</span>;
 
   readonly attribute DOMString <span title="dom-textarea-type">type</span>;
            attribute DOMString <span title="dom-textarea-defaultValue">defaultValue</span>;
            attribute DOMString <span title="dom-textarea-value">value</span>;
 
   readonly attribute boolean <span title="dom-cva-willValidate">willValidate</span>;
@@ -37350,20 +37354,49 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
   <p><strong>Constraint validation:</strong> If the element has its
   <code title="attr-textarea-required">required</code> attribute
   specified, and the element is <span
   title="concept-textarea-mutable">mutable</span>, and the element's
   <span title="concept-fe-value">value</span> is the empty string,
   then the element is <span>suffering from being missing</span>.</p>
 
   </div>
 
+
+  <!-- similar text in the <input> section -->
+
+  <p>The <dfn
+  title="attr-textarea-placeholder"><code>placeholder</code></dfn>
+  attribute represents a hint (a word or short phrase) intended to aid
+  the user with data entry. A hint could be a sample value or a brief
+  description of the expected format. The attribute, if specified,
+  must have a value that contains no U+000A LINE FEED (LF) or U+000D
+  CARRIAGE RETURN (CR) characters.</p>
+
+  <p class="note">For a longer hint or other advisory text, the <code
+  title="attr-title">title</code> attribute is more appropriate.</p>
+
+  <p>The <code title="attr-textarea-placeholder">placeholder</code>
+  attribute should not be used as an alternative to a
+  <code>label</code>.</p>
+
+  <div class="impl">
+
+  <p>User agents should present this hint to the user, after having
+  <span title="strip line breaks">stripped line breaks</span> from it,
+  when the element's <span title="concept-fe-value">value</span> is
+  the empty string and the control is not focused (e.g. by displaying
+  it inside a blank unfocused control).</p>
+
+  </div>
+
+
   <p>The <code title="attr-fae-form">form</code> attribute is used to
   explicitly associate the <code>textarea</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. The <code title="attr-fe-autofocus">autofocus</code>
   attribute controls focus.</p>
 
   <dl class="domintro">
@@ -37384,21 +37417,22 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
     <p>Can be set, to change the value.</p>
 
    </dd>
 
   </dl>
 
   <div class="impl">
 
   <p>The <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn
-  title="dom-textarea-required"><code>required</code></dfn>, <dfn
+  title="dom-textarea-placeholder"><code>placeholder</code></dfn>,
+  <dfn title="dom-textarea-required"><code>required</code></dfn>, <dfn
   title="dom-textarea-rows"><code>rows</code></dfn>, and <dfn
   title="dom-textarea-wrap"><code>wrap</code></dfn> attributes must
   <span>reflect</span> the respective content attributes of the same
   name. The <code title="dom-textarea-cols">cols</code> and <code
   title="dom-textarea-rows">rows</code> attributes are <span>limited
   to only positive non-zero numbers</span>. The <dfn
   title="dom-textarea-maxLength"><code>maxLength</code></dfn> DOM
   attribute must <span>reflect</span> the <code
   title="attr-textarea-maxlength">maxlength</code> content attribute.
   The <dfn title="dom-textarea-readOnly"><code>readOnly</code></dfn>
@@ -73711,22 +73745,20 @@ TODO (or delay):
        and "base-sixteen", the order that 0-9 A-Z a-z is mentioned,
        and the detail to which the spec explains how to interpret a
        string as a hexadecimal number.
  XXX * expose the form data set, either as an object (on which one can
        invoke the JSON serialiser), or in the form of a method on
        HTMLFormElement that returns the form data set serialised
        according to a particular encoding (defaulting to the form's
        enctype="" one, probably). This would allow forms to be used
        with XHR-like systems without having to manually construct the
        form data set the way that is done today.
- XXX * placeholder="" for <textarea>, e.g. as seen on:
-       http://code.google.com/p/support/issues/detail?id=1#makechanges
  XXX * become more consistent about what markup we use to mark up
        productions (nothing? <i>? <code>?)
  XXX * expose the value of a radio button group
         - either on the NodeList returned by HTMLFormControlCollection
         - or on the radio button itself
         - or both, so it works even when the form controls have names
           that vary more than HTMLFormControlCollection allows?
  XXX * should check all cases of 'active document' and change the
        relevant ones to 'fully active document'.
  XXX * use <code>Document</code> consistently instead of 'document'.

|