[html5] r7363 - [e] (0) Try to clarify placeholder='s role in life. Fixing https://www.w3.org/Bu [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 16 22:16:00 PDT 2012


Author: ianh
Date: 2012-09-16 22:16:00 -0700 (Sun, 16 Sep 2012)
New Revision: 7363

Modified:
   source
Log:
[e] (0) Try to clarify placeholder='s role in life.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17937
Affected topics: HTML

Modified: source
===================================================================
--- source	2012-09-17 05:06:31 UTC (rev 7362)
+++ source	2012-09-17 05:16:00 UTC (rev 7363)
@@ -60845,23 +60845,31 @@
 
   <h6>The <code title="attr-input-placeholder">placeholder</code> attribute</h6>
 
-  <!-- similar text in the <textarea> section -->
+  <!-- substantially 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>
+  intended to aid the user with data entry when the control has no
+  value. 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-input-placeholder">placeholder</code>
   attribute should not be used as an alternative to a
-  <code>label</code>.</p>
+  <code>label</code>. For a longer hint or other advisory text, the
+  <code title="attr-title">title</code> attribute is more
+  appropriate.</p>
 
+  <p class="note">These mechanisms are very similar but subtly
+  different: the hint given by the control's <code>label</code> is
+  shown at all times; the short hint given in the <code
+  title="attr-input-placeholder">placeholder</code> attribute is shown
+  before the user enters a value; and the hint in the <code
+  title="attr-title">title</code> attribute is shown when the user
+  requests further help.</p>
+
   <div class="impl">
 
   <p>User agents should present this hint to the user, after having
@@ -62942,23 +62950,40 @@
   </div>
 
 
-  <!-- similar text in the <input> section -->
+  <!-- substantially similar text in the <input> 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 when the control has no
+  value. 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>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>
+  attribute represents a <em>short</em> hint (a word or short phrase)
+  intended to aid the user with data entry when the control has no
+  value. 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>
+  <code>label</code>. For a longer hint or other advisory text, the
+  <code title="attr-title">title</code> attribute is more
+  appropriate.</p>
 
+  <p class="note">These mechanisms are very similar but subtly
+  different: the hint given by the control's <code>label</code> is
+  shown at all times; the short hint given in the <code
+  title="attr-textarea-placeholder">placeholder</code> attribute is
+  shown before the user enters a value; and the hint in the <code
+  title="attr-title">title</code> attribute is shown when the user
+  requests further help.</p>
+
   <div class="impl">
 
   <p>User agents should present this hint to the user, after having




More information about the Commit-Watchers mailing list