W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2006

Re: Use of pre-compilated text-fields in forms

From: Patrick H. Lauke <redux@splintered.co.uk>
Date: Mon, 08 May 2006 22:31:53 +0100
Message-ID: <445FB8C9.1080709@splintered.co.uk>
To: w3c-wai-ig@w3.org

Bailey, Bruce wrote:

> And suggests:
> <input name="textfield" type="text" value="word">
> 
> Does this example actually work?  I thought default place holder text was much harder than that?

It works, but can have usability issues...users need to first clear the 
placeholder value before entering their own text; this is easier by 
keyboard (which, when tabbing into the field, already preselects the 
entire existing value, allowing the user just to start typing and 
overwrite the placeholder) than mouse (where clicking on the input 
usually sets the cursor/caret, rather than selecting the current value). 
Of course, many people then use javascript to clear the input on focus 
(unless it contains anything other than the default value)...but it's 
not elegant.

> Is there anything wrong with *WCAG* requiring *optional* attributes?

Not per se. WCAG requires quite a few things that are optional (think 
for instance the lang attribute on the HTML root element itself to 
identify the primary language of the document). However, adding them can 
make it easier for certain user agents / users to understand the content 
and treat it appropriately.

> Does the above actually result in *invalid* code?  (I think that was one of Laboo's concerns.)

It doesn't result in invalid code, no. Note, however, that the 
placeholder checkpoint is one of the "Until user agents..." ones. Older 
versions of certain browsers/AT (as well as, apparently, a few of even 
the current braillers) simply ignore(d) inputs without any placeholding 
text. This is obviously a bug/shortcoming in those user agents, which 
this checkpoint tried to aknowledge and compensate for. Apart from those 
braillers, though, current browsers/AT don't have a problem at all 
dealing with inputs lacking default values, so the checkpoint itself is 
pretty much irrelevant now (and in the current draft of WCAG 2.0, this 
type of requirement has gone, as mentioned in the last point of the 
table at the start of Appendix D: Comparison of WCAG 1.0 checkpoints to 
WCAG 2.0).

P
-- 
Patrick H. Lauke
__________________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
__________________________________________________________
Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
__________________________________________________________
Received on Monday, 8 May 2006 21:32:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:24 GMT