This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23608 - Inconsistency between "placeholder" attribute and "placeholder label option"
Summary: Inconsistency between "placeholder" attribute and "placeholder label option"
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-23 14:08 UTC by Takeshi Kurosawa
Modified: 2016-04-22 21:23 UTC (History)
7 users (show)

See Also:


Attachments

Description Takeshi Kurosawa 2013-10-23 14:08:54 UTC
In HTML 5.1 nightly (as of 2013-10-23), there is a note for "placeholder" attribute:
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-placeholder-attribute

> While the hint given by the control's label is shown at all times, the short hint given in the placeholder attribute is only shown before the user enters a value.

Yet "placeholder label option" has same issue (it is only shown before the user selects an option),

1. there are no notes for "placeholder label option" and
2. there is an advise to use "placeholder label option" instead label.


1. There are no notes for "placeholder label option"
See http://www.w3.org/html/wg/drafts/html/master/forms.html#placeholder-label-option


2. There is an advise to use "placeholder label option" instead label

In the example near the "size" property (IDL attributes) definition,
http://www.w3.org/html/wg/drafts/html/master/forms.html#dom-select-size

> When there is no default option, a placeholder can be used instead:
>
> <select name="unittype" required>
>  <option value=""> Select unit type </option>
>  <option value="1"> Miner </option>
>  <option value="2"> Puffer </option>
>  <option value="3"> Snipey </option>
>  <option value="4"> Max </option>
>  <option value="5"> Firebot </option>
> </select>


I think we should add notes for "placeholder label option" and tweak the example.
I'm not sure what is the best practice for such situation, a possible modification is:

> <p>
>  <label for="unittype">Unit type:</label>
>  <select name="unittype" required>
>   <option value=""> Select from the list </option>
>   <option value="1"> Miner </option>
>   <option value="2"> Puffer </option>
>   <option value="3"> Snipey </option>
>   <option value="4"> Max </option>
>   <option value="5"> Firebot </option>
>  </select>
> </p>


# "HTML to Platform Accessibility APIs Implementation Guide" may need "placeholder label option" section for "6. Accessible Name and Description calculation".
Comment 1 Adrian Roselli 2013-10-30 17:31:36 UTC
The "placeholder" is a defined attribute that applies to the <input> element:
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-placeholder-attribute

The <select> element has no corresponding attribute or feature, though rules for a de facto place-keeping item are defined as a "placeholder label option," which is only referenced again from the <option> definition:
http://www.w3.org/html/wg/drafts/html/master/forms.html#placeholder-label-option

I think those rules mostly describe behavior in browsers today (and yesterday) instead of laying out requirements. Users may still select it, though validation routines may reject it.

To address your points:

1. I don't think there need to be any notes. The term is described strictly in the context of the <select> and <option> elements, and links back to its inline definition at each use. Moving it to a note can confuse the issue by possibly causing readers to assume its scope has expanded.

2. I agree, the use of "placeholder" here is confusing, given its use as an attribute elsewhere. Perhaps just this change?

"When there is no default option, a [placeholder label option] can be used instead:"

And that links back to the definition within 4.10.9? Or perhaps something a bit more robust:

"When there is no default option, a [value that provides instructions or a hint (placeholder label option)] can be used instead:"
Comment 2 Arron Eicholz 2016-04-22 21:23:14 UTC
HTML5.1 Bugzilla Bug Triage: Fixed added a small change to the wording, "...value that provides instruction or a hint (placeholder option)..."

If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!