Using label elements to associate text labels with form controls

Hi,
Just a note about an issue find today analizing some italian web sites for
italian law conformance, and that regards:
http://trace.wisc.edu/wcag_wiki/index.php?title=Using_label_elements_to_asso
ciate_text_labels_with_form_controls

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" />
</label>

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