RE: label across /td

As most would agree, it would be reasonable to do the following

	<td><label> ... </label></td>
	<td><input... /></td>

However, does this violate any accessibility guidelines that mention that the label should be immediately to the left of the control?  in the above example, it is pretty much immediately to the left, but this coding shows the label and field separated by table cells.  This could result in some issues in some occasions.

The other issue is when you wish to make the field active on clicking the label as well.  Normally you would need to code the field inside the label along with the text label itself.  This is the case where you might put label outside td.  But if this is not good coding.....?

I guess it comes down to using CSS for all layout purposes, but the same difficulties arise.  Are we suggesting that one might do the following.

<div>
<span><label>....></span><span><input .... /></span></label></span>
</div>

where you specify CSS to lay things out the way you want, but you use spans inside the label instead of block level elements, so that you are not violating the notion of block level elements inside inline level ones?

Mat.



-----Original Message-----
From: James Craig [mailto:work@cookiecrook.com]
Sent: Friday, 14 February 2003 8:28 AM
To: W3c-Wai-Ig
Subject: Re: label across /td



The markup guys would throw a fit about this proposal, and rightfully so.
'label' is an inline element and cannot contain block-level elements like
'td'. Mozilla and some other graphical browsers associate 'label' and
'input' elements correctly, but I cannot speak for any screen readers.

James


----- Original Message -----
From: "Aaron Smith" <aaron@gwmicro.com>
To: "Joe Clark" <joeclark@joeclark.org>; "WAI-IG" <w3c-wai-ig@w3.org>
Sent: Thursday, February 13, 2003 3:09 PM
Subject: Re: label across /td


>
> Ideally, we will be able to retrieve the contents of the label and apply
it
> to the "associated" element regardless of what lies within the label tag.
> But just to make sure I understand, are you proposing that beginning and
> ending row tags might be inside of a label tag?
>

Received on Thursday, 13 February 2003 16:57:34 UTC