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 21722 - Ambiguous/incorrect wording regarding placeholder attribute of input elements
Summary: Ambiguous/incorrect wording regarding placeholder attribute of input elements
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Robin Berjon
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y, a11ytf, CR
Depends on:
Blocks:
 
Reported: 2013-04-16 18:48 UTC by Ted Hopp
Modified: 2014-01-16 15:10 UTC (History)
6 users (show)

See Also:


Attachments

Description Ted Hopp 2013-04-16 18:48:49 UTC
The CR HTML 5 spec has ambiguous wording regarding the display of the placeholder attribute in input elements (http://www.w3.org/TR/html5/forms.html#the-placeholder-attribute):

"User agents should present this hint to the user, after having stripped line breaks from it, when the element's value is the empty string and/or the control is not focused (e.g. by displaying it inside a blank unfocused control and hiding it otherwise)."

The use of "and/or" is ambiguous and, in fact, different browsers have implemented different behavior for blank, focused fields: some display the placeholder and other do not. Moreover, it makes no sense to display the placeholder when the input element is not empty, regardless of the focus state.

The nightly 5.1 draft (http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-input-placeholder) has changed the language, but not for the better:

"User agents should present this hint to the user, after having stripped line breaks from it, when the element's value is the empty string or the control is not focused (or both), e.g. by displaying it inside a blank unfocused control and hiding it otherwise."

It eliminates the ambiguity (using "or" instead of "and/or"), but in a way that is inconsistent with the example (which is no longer a parenthetical). If the example is accurate, then "and/or" should have been replace with "and", not "or". Moreover, "or" (and the accompanying "(or both)" makes no more sense than before: an unfocused input element that is not empty should not display the placeholder. Finally, if the example ("e.g.") is supposed to be a restatement of the requirement, then "e.g." should be replaced with "i.e.".
Comment 1 Travis Leithead [MSFT] 2013-07-12 23:02:55 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:


   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: Fixed the Boolean logic to be self-consistent with another part of the spec, and as per described in this bug.

Fixed in both CR: https://github.com/w3c/html/commit/3790bcd198dc70e6fd003eb990b95b029450c6d8
and in 5.1:
https://github.com/w3c/html/commit/41a12ca1a185370c17a0b5f3f3376e6f1e5b5a83
Comment 2 github bugzilla bot 2014-01-16 13:43:38 UTC
Commit pushed to merge-CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/fef5e33dcd70b553a009f6f5d4008b3128977b38
Fixed remarkably stupid use of the START/END marks

[Bug 21722] Fix boolean logic on when to show placeholder text

Fixes Bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=21722

This aligns one section of the spec with the same [corrected] logic in
another part of the spec: the placeholder text should NOT show when just
the element is not focused...

(cherry picked from commit 41a12ca1a185370c17a0b5f3f3376e6f1e5b5a83)
(cherry picked from commit 3790bcd198dc70e6fd003eb990b95b029450c6d8)

Conflicts:
	source
Comment 3 github bugzilla bot 2014-01-16 15:10:11 UTC
Commits pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/41a12ca1a185370c17a0b5f3f3376e6f1e5b5a83
[Bug 21722] Fix boolean logic on when to show placeholder text

https://github.com/w3c/html/commit/fef5e33dcd70b553a009f6f5d4008b3128977b38
Fixed remarkably stupid use of the START/END marks