W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > October to December 2006

Using label elements to associate text labels with form controls

From: Roberto Scano - IWA/HWG <rscano@iwa-italy.org>
Date: Mon, 11 Dec 2006 19:25:06 +0100
To: <w3c-wai-gl@w3.org>
Message-ID: <012e01c71d51$b22bf450$2201a8c0@rsnbiwa>

Just a note about an issue find today analizing some italian web sites for
italian law conformance, and that regards:

I've found that for web site search engine, some web sites uses this code:

<p><label for="aaa" class="hidden">Insert a text:</label>
<input type="text" id="aaa"  /></p>

Using css for hiding the label. This could be not dangerous for
phisical-impaired users that cannot use also label for "click" and "choose"
to act with an input field (or a radio button).

But the terrible thing is the follow:

<label for="aaa">
	<input type="text" id="aaa" value="Insert a text" />

In this case there is no label text but the developer set the input element
as label of itself. I have don't find that this is not valid referring to
DTD and I haven't find nothing inside WCAG 2.0 that don't say: "label should
be text bla bla bla ...

Any idea?
Received on Monday, 11 December 2006 18:34:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 January 2018 15:34:01 UTC