HTML Standard Tracker

Diff (omit for latest revision)

Short URL:

File a bug

SVNBugCommentTime (UTC)
2921Add placeholder= for <textarea>.2009-03-30 01:21
Index: source
--- source	(revision 2920)
+++ source	(revision 2921)
@@ -35691,6 +35691,8 @@
   <h6>The <code title="attr-input-placeholder">placeholder</code> attribute</h6>
+  <!-- similar text in the <textarea> section -->
   <p>The <dfn
   attribute represents a <em>short</em> hint (a word or short phrase)
@@ -37131,6 +37133,7 @@
    <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>
@@ -37144,6 +37147,7 @@
   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>;
@@ -37357,6 +37361,35 @@
+  <!-- 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>
@@ -37391,7 +37424,8 @@
   <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
@@ -73718,8 +73752,6 @@
        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:
  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