E-mail List Archives

Re: Alternatives to LEGEND for a radio button?


From: D A
Date: Aug 26, 2009 12:40PM

> 3) Would there be another tag that is acceptable in this scenario?
> I've read that some have just abandoned use of the legend tag due to
> all the styling issues and instead use a header tag of some sort.

Well, that's what I did. Fighting the legend tag was just too much. So
I'm swapping in an H2. Any comments on the following markup exampe?

<legend>Fieldset Legend</legend>
<label for="name">Name</label>
<input type="text" id="name" />
<label for="address1">Address<em>*</em></label>
<input type="text" id="address1" />
<h2>formatted as label for group elements</h2>
<div class="radioButtonGroup">
<label><input type="radio"
name="invoice-address" />Yes</label>
<label><input type="radio"
name="invoice-address" />No</label>