"Spartanicu s" <me@privacy.net > wrote in message
news:qf******** *************** *********@news. spartanicus.utv internet.ie...
Is this correct usage of <label>?:
<h5><label for="sp-q"><img src="search.png " alt="Search"></label></h5>
<form method="get" action="http://search.atomz.co m/search/">
<div>
<input name="sp-q" id="sp-q">
<input type="submit" value="Search this site">
[...]
</div>
</form>
The accessibility checker cynthiasays.com doesn't accept this as
correct, Nick's Accessibility Valet doesn't complain.
In terms of valid HTML, the LABEL element can go anywhere any form control
can go except inside another LABEL. This means, in turn, that it can go
anywhere *any* inline code can go except inside a BUTTON.
I don't see anything in the spec that requires the LABEL to be physically
inside the form that contains the control to which it applies. Since it's
not a control--it doesn't have a value that gets posted with the form--I
expect that it doesn't matter. But I suggest checking out what a few
browsers actually do in such a case.