Re: [whatwg] The placeholder attribute
On 22 and 24 Sep 2011, Bjartur Thorlacius wrote: > > The semantics of the placeholder and title attributes of inputs overlap > slightly; the placeholder attribute may contain a hint to aid the user, > while title is to contain "other advisory text." I can think of two > valid uses of placeholder: example value, and the text "click here to > type" or "enter search query here." The latter is obviously user > interface that should be implemented by interactive user agents. Then > there is the third use, use it as a title attribute (but with richer > presentation). > > Users might want values falling under the first to be prefixed with > "e.g.", "for example" or equivalent - but by allowing the latter use > forces authors to add it to all example values, rather than letting the > user's style sheet take care of it. Thus I suggest narrowing the > semantics of the attribute to example values, allowing for easier > styling by users (or agents, on their behalf). The second one should > have no valid representation. Lastly, the specification should make it > clearer what the title attribute is appropriate for; a description of > the input or format. > > Also, I see no reason to suggest not rendering the text when the input > is focused - in special on 1D devices such as speech - considering that > JavaScript dependent sites (such as Hotmail) have placed example values > in a small font below the input so that it can be visible while the user > is typing, and, more importantly, after the input has been focused > (whether automatically or manually), but before the user starts typing. > > As for the argument against using the title attribute for everything > that it would break existing sites, I do believe rendering the title > attribute of an empty and unfocused input inside of it is an improvement > over displaying a tooltip a second or two after the user positions a > cursor over the input (irrespective of focus). How on Earth is anyone to > think of doing that? Displaying the title attribute in a floating box in > a margin when an input is focused, followed by the example value > prefixed with "e.g." would be my preferred rendering, but that's just my > opinion. > Should @placeholder be renamed @eg, and used exclusively for example > input? I think you're overthinking it. :-) In theory, the main differences between title="" and placeholder="" is that title="" can be longer and would be shown on request, while placeholder="" is shorter, shown as part of the input feature, typically only when there's no input already, and would be specifically about the input format. In practice, on visual media, this means title="" is a tooltip and placeholder="" is an inline caption. > P.S. The last paragraph of the section on the pattern attribute links > twice to . Should it not link to > ? Fixed, thanks. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] The placeholder attribute
Should @placeholder be renamed @eg, and used exclusively for example input? On Thu, Sep 22, 2011 at 11:53 PM, Bjartur Thorlacius wrote: > The semantics of the placeholder and title attributes of inputs overlap > slightly; the placeholder attribute may contain a hint to aid the user, > while title is to contain "other advisory text." I can think of two valid > uses of placeholder: example value, and the text "click here to type" or > "enter search query here." The latter is obviously user interface that > should be implemented by interactive user agents. Then there is the third > use, use it as a title attribute (but with richer presentation). > Users might want values falling under the first to be prefixed with "e.g.", > "for example" or equivalent - but by allowing the latter use forces authors > to add it to all example values, rather than letting the user's style sheet > take care of it. Thus I suggest narrowing the semantics of the attribute to > example values, allowing for easier styling by users (or agents, on their > behalf). The second one should have no valid representation. Lastly, the > specification should make it clearer what the title attribute is appropriate > for; a description of the input or format. > > Also, I see no reason to suggest not rendering the text when the input is > focused - in special on 1D devices such as speech - considering that > JavaScript dependent sites (such as Hotmail) have placed example values in a > small font below the input so that it can be visible while the user is > typing, and, more importantly, after the input has been focused (whether > automatically or manually), but before the user starts typing. > > As for the argument against using the title attribute for everything that it > would break existing sites, I do believe rendering the title attribute of an > empty and unfocused input inside of it is an improvement over displaying a > tooltip a second or two after the user positions a cursor over the input > (irrespective of focus). How on Earth is anyone to think of doing that? > Displaying the title attribute in a floating box in a margin when an input > is focused, followed by the example value prefixed with "e.g." would be my > preferred rendering, but that's just my opinion. > > P.S. The last paragraph of the section on the pattern attribute links twice > to . Should it not link to > ? >
[whatwg] The placeholder attribute
The semantics of the placeholder and title attributes of inputs overlap slightly; the placeholder attribute may contain a hint to aid the user, while title is to contain "other advisory text." I can think of two valid uses of placeholder: example value, and the text "click here to type" or "enter search query here." The latter is obviously user interface that should be implemented by interactive user agents. Then there is the third use, use it as a title attribute (but with richer presentation). Users might want values falling under the first to be prefixed with "e.g.", "for example" or equivalent - but by allowing the latter use forces authors to add it to all example values, rather than letting the user's style sheet take care of it. Thus I suggest narrowing the semantics of the attribute to example values, allowing for easier styling by users (or agents, on their behalf). The second one should have no valid representation. Lastly, the specification should make it clearer what the title attribute is appropriate for; a description of the input or format. Also, I see no reason to suggest not rendering the text when the input is focused - in special on 1D devices such as speech - considering that JavaScript dependent sites (such as Hotmail) have placed example values in a small font below the input so that it can be visible while the user is typing, and, more importantly, after the input has been focused (whether automatically or manually), but before the user starts typing. As for the argument against using the title attribute for everything that it would break existing sites, I do believe rendering the title attribute of an empty and unfocused input inside of it is an improvement over displaying a tooltip a second or two after the user positions a cursor over the input (irrespective of focus). How on Earth is anyone to think of doing that? Displaying the title attribute in a floating box in a margin when an input is focused, followed by the example value prefixed with "e.g." would be my preferred rendering, but that's just my opinion. P.S. The last paragraph of the section on the pattern attribute links twice to . Should it not link to ?
Re: [whatwg] The placeholder attribute - Last Call Comment/Question
On Thu, Oct 8, 2009 at 3:08 PM, Tab Atkins Jr. wrote: > On Thu, Oct 8, 2009 at 4:34 PM, Garrett Smith wrote: >> Comment on 4.10.5.2.11 The placeholder attribute: >> >> What is the user-interaction behavior for this? Should the behavior be >> specified, or should this be implementation-dependent? > > I believe that there's currently no specific behavior, beyond the > requirements listed at > http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-placeholder-attribute Yeah, I guess that covers it well enough. Thanks.
Re: [whatwg] The placeholder attribute - Last Call Comment/Question
On Thu, Oct 8, 2009 at 4:34 PM, Garrett Smith wrote: > Comment on 4.10.5.2.11 The placeholder attribute: > > What is the user-interaction behavior for this? Should the behavior be > specified, or should this be implementation-dependent? I believe that there's currently no specific behavior, beyond the requirements listed at http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-placeholder-attribute regarding displaying the value of @placeholder when the input is empty and unfocused. It does give a suggestion for how to display this at the end of that paragraph, though (displaying it inside the input, which is how we're all used to placeholders working). Currently, though, if a UA wanted to display it differently, they could. > http://dev.w3.org/html5/spec/Overview.html#the-placeholder-attribute > (is this the correct URL?) There's nothing wrong with that url, it's just generated last in the chain and so might be a little bit behind (just barely), and uses w3c styling rather than whatwg styling. The primary document is the single-page version at whatwg.org, and the multipage version at whatwg.org is just slightly behind that. ~TJ
[whatwg] The placeholder attribute - Last Call Comment/Question
Comment on 4.10.5.2.11 The placeholder attribute: What is the user-interaction behavior for this? Should the behavior be specified, or should this be implementation-dependent? http://dev.w3.org/html5/spec/Overview.html#the-placeholder-attribute (is this the correct URL?) Garrett