4 ms·
The recommendation is totally legit, even ignoring accessibility concerns (which are true). I can't tell you how many times I've tabbed onto the next field and
by dizzystar 10y ago
The recommendation is totally legit, even ignoring accessibility concerns (which are true). I can't tell you how many times I've tabbed onto the next field and had to tab off just to see the value I was supposed to be putting in. It gets worse when this is in JS and for whatever reason, the field name doesn't reappear, or better yet, when the suggestion doesn't disappear and I have to manually erase it.
It gets even more confusing when there is a suggested format, like date, you have to manually enter. Was it mm/dd/yy or mm/dd/yyyy? All of that should be above the form input.
Using nothing but place holders is a serious pet peeve of mine on all levels. Please don't, just don't do it. I don't understand what benefit is has. I suppose it works fine if you have users that only use mouse clicks, but it is mayhem for people who use key commands.
- DanielBMarkham 10y agoWouldn't the type attribute on the input indicate to the phone/browser/etc what's to be expected? Perhaps with a title attribute added? I'm okay with it, and I'll do it from now on. Just seems kinda weird to start displaying things based on accessibility. I thought that all played out behind the scenes (in things like the alt attr for images)
- garaetjjte 10y ago> I can't tell you how many times I've tabbed onto the next field and had to tab off just to see the value I was supposed to be putting in. Placeholders don't disappear if you just focus input, only when you type first character.
- rpedela 10y agoPlaceholders disappear in IE.
- talmand 10y agoI think we all know the root of that problem.
- strictnein 10y agoIn this case IE actually follows the specification: https://www.w3.org/TR/html5/forms.html#the-placeholder-attribute https://www.w3.org/TR/html5/forms.html#the-placeholder-attri... > "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 the control is not focused"
- talmand 10y agoThen the specification is wrong, needs to be updated.
- blakeyrat 10y agoIt's great, though, how you immediately jumped on Microsoft without even bothering to check whether what they did was correct or not, though. IE's been as up-to-date as any other browser for like 5-6 years now. Let the hate go already.
- talmand 10y agoYes, I am now saying the behavior is wrong and goes against user experience. Since IE is going by specifications then I agree my dislike for it in this instance is likely misdirected. On the other hand, it seems the other browsers saw the spec and rightfully disagreed with this behavior; so I'm back to disliking IE.
- dragonwriter 10y ago> On the other hand, it seems the other browsers saw the spec and rightfully disagreed with this behavior The w3 spec almost certainly postdates the browser vendors decision on what they would implement (and probably the actual implementation -- all the meaningful work on HTML goes on in the WHATWG living standard, the W3 spec is a frozen backward-looking interpretation of that, but even the WHATWG spec is probably a result of the vendor's decision on what to implement, rather than the decisions being based on the spec.) It probably says what it says precisely because that is the level of commonality of behavior between major vendors, with non-Microsoft vendors also displaying the placeholder when the field is empty but focused. EDIT: Note also that the WHATWG spec, at least, specifies additional behavior if the user agent does not normally display the value when focused ("If a user agent normally doesn't show this hint to the user when the control is focused, then the user agent should nonetheless show the hint for the control if it was focused as a result of the autofocus attribute, since in that case the user will not have had an opportunity to examine the control before focusing it.") [0] [0] https://html.spec.whatwg.org/multipage/forms.html#attr-input-placeholder https://html.spec.whatwg.org/multipage/forms.html#attr-input...
- steveax 10y agoThe behavior is implementation specific. It differs between browsers.