<div class="gmail_quote">On Tue, Dec 2, 2008 at 2:44 AM, Ian Hickson <span dir="ltr"><ian@hixie.ch></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Mon, 17 Nov 2008, Ojan Vafai wrote:<br>> This is a useful property on any text input element. Seems like it<br>
> should apply to textareas as well as contentEditable elements and<br>
> iframes with designMode on. I can point to real-world examples of the<br>
> latter if need be. I think it's acceptable that it be a plain-text<br>
> string in all cases, but that it ought to also be CSS styleable. I don't<br>
> know if html5 is the right place to spec that. WebKit currently uses the<br>
> input::-webkit-input-placeholder.<br>
<br>
</div>I think for contentEditable it's definitely not something we want to<br>
support natively; I've no idea how that would even work. I'd recommend<br>
doing it in CSS, using generated content based on the title="" attribute<br>
or some such.<br></blockquote><div><br></div><div>I don't follow. What's the difficulty with supporting placeholder for contentEditable? The point is that you want it to correspond to focus state, so generated content doesn't really help you much there. You still end up with complicated code that's hard to get right. For example, I only know of Google properties that do this (GoogleBase, Groups, Page Creator and Presentations).</div>
<div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For <textarea>, a placeholder value seems odd. Do you have examples of<br>
people doing that?<br>
<div></div></blockquote><div><br></div><div>I don't have examples other than Thomas's, however, a <a href="http://www.google.com/search?rlz=1C1GGLD_enUS289US301&sourceid=chrome&ie=UTF-8&q=textarea+with+placeholder+text">quick google search</a> does point to a lot of tutorial sites for adding placeholder text to textareas. I don't quite see what's odd about it though. It's just another case where you want to communicate what the user should put into an text-entry area and it has all the same complexity to the web developer that a text input has.</div>
<div><br></div><div>Ojan</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Tue, 25 Nov 2008, Matthew Paul Thomas wrote:<br>
><br>
> I was asking, obviously, what use is a default value if you can't edit<br>
> it. If an enabled text field had a displayed value= but the value was<br>
> not actually editable, that would be unpleasantly surprising.<br>
><br>
</div><div>> That problem applies just as much to <input placeholder="foo"> as it<br>
> would have done to <input value="foo" clearonfocus>: depending on<br>
> whether the placeholder text is greyed out, it would make the field<br>
> either look like it has a value when it actually doesn't, or look<br>
> disabled when it actually isn't. It would also hide the label or hint<br>
> for the field for *precisely* the period when you need it most. I'm not<br>
> aware of any possible presentation that avoids both (or even one of!)<br>
> those problems, and previously HTML5 has shied away from expecting<br>
> browsers to implement things that have no known reasonable presentation.<br>
><br>
</div><div>> I appreciate that Web authors currently go to some scripting lengths to<br>
> position labels for text fields inside the fields, and I think it's<br>
> quite appropriate that they should have to go to those lengths, because<br>
> it makes bad design more difficult. I would rather see, as I've<br>
> previously suggested, markup for associating form controls with hints<br>
> outside them in a similar way as labels can be associated now.<br>
<br>
</div>I understand your position, but it seems that the industry has moved<br>
towards this as a pretty standard feature of user interfaces now, for<br>
better or worse.<br>
<div><div></div><div><br>
--<br>
Ian Hickson U+1047E )\._.,--....,'``. fL<br>
<a href="http://ln.hixie.ch/" target="_blank">http://ln.hixie.ch/</a> U+263A /, _.. \ _\ ;`._ ,.<br>
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'<br>
</div></div></blockquote></div><br>