Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not a Bug
-
Affects Version/s: Release 1.4.2
-
Fix Version/s: None
-
Component/s: Tag Library
-
Labels:None
Description
Here's the html label tag:
<input type="radio" name="choiceID" id="answer1" value="2" />
<label for="answer1"> Spiderman</label>
One of the neat things about using the label tag is that when you click on the label associated with the radio button, the radio button gets clicked. Notice that the label/for matches up with the radio/id.
Here's the stripes label tag:
<stripes:radio name="testA" value="0" />
<stripes:label for="testA">Test A: </stripes:label>
Here's the html generated by the stripes label tag:
<input value="0" type="radio" name="testA" />
<label class="null" for="testA">Test A: </label>
Notice that the label/for does NOT match up with the radio/id.
In the example, the label/for value SHOULD match up with the radio/id value. Because it does not (it doesn't even have an id in this particular example), clicking on the label does not select the radio button like it should.
P.S. And <label class="null" seems like a bug, to.
On the mailing list, Paul Barry wrote:
You have to supply the id yourself, because ID has to be unique on a page, whereas name will not be. Examples:
<input id="testA0" value="0" type="radio" name="testA" />
<label id="testA0" class="null" for="testA">Test A: </label>
<input id="testA1" value="1" type="radio" name="testA" />
<label id="testA1" class="null" for="testA">Test A: </label>