Closed Bug 543209 Opened 14 years ago Closed 14 years ago

radio button grouping not performing as expected

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 229925

People

(Reporter: themadman, Unassigned)

References

()

Details

(Keywords: qawanted)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 GTB6 FBSMTWB
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 GTB6 FBSMTWB

On the bugtest page, there is a form with 2 groups of radio buttons. the top 3 are name="GPS0" , the bottom 17 are name="grpOpt". When one of "grpOpt" (lower grouping) is clicked, all is ok but when one of "GPS0" (upper) group is clicked, the top element gets selected.
If you double-click one of the "GPS0" (top) elements, it works as expected. Latest IE(8.0.6***) and Chrome perform as expected.
Happens on Vista Business and XP Professional

Reproducible: Always

Steps to Reproduce:
1.Navigate to url http://www.ocallaghan.co.za/bugtest.php
2.Click the 2nd ("Nuvi 710") or 3rd ("Zumo 660") radio buttons
3.
Actual Results:  
first ("Nuvi 660") radio button becomes active, not the button clicked

Expected Results:  
2nd ("Nuvi 710") or 3rd ("Zumo 660") radio button should have become active, not the first one

Sometimes the first radio of the second group (titled "Cape Peninsula") will also not accept the click action. Not easily replicated.
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100130 Minefield/3.7a1pre

This works as expected with Google Chrome and Opera.
Component: General → Layout: Form Controls
Keywords: qawanted
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
This has three radio buttons all in one big label element.

HTML5 makes it clear that our behavior is correct:
# If the for attribute is not specified, but the label element has a labelable
# form-associated element  descendant, then the first such descendant in tree
# order is the label element's labeled control.
--http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-label-element

HTML4, on the other hand, doesn't say what happens, but describes this as an authoring error:
# To associate a label with another control implicitly, the control element
# must be within the contents of the LABEL element. In this case, the LABEL
# may only contain one control element.
--http://www.w3.org/TR/html4/interact/forms.html#h-17.9.1
However, my previous comment applies to behavior when clicking on the text next to the radio buttons; we should probably behave correctly when clicking on the radio buttons themselves, which I guess is what this bug is about.  Sorry.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.