E-mail List Archives

Re: Alternatives to LEGEND for a radio button?

for

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?

<form>
<fieldset>
<legend>Fieldset Legend</legend>
<ol>
<li>
<label for="name">Name</label>
<input type="text" id="name" />
</li>
<li>
<label for="address1">Address<em>*</em></label>
<input type="text" id="address1" />
</li>
<li>
<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>
</div>
</li>
</ol>
</fieldset>
</form>

-Darrel