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).

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
Web Standards Project (WaSP) Accessibility Task Force
Received on Monday, 8 May 2006 21:32:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:34 UTC