Closed Bug 283310 Opened 19 years ago Closed 19 years ago

LABEL tag wrapped around multiple radio buttons makes radio buttons unusable

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 229925

People

(Reporter: d.stowell, Unassigned)

References

()

Details

(Whiteboard: DUPEME)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0

A group of radio buttons can be referred to by a single HTML <label> by wrapping
the whole set of radio buttons within a single <label> element. In Mozilla this
seems to cause a problem - it renders the radio buttons unusable (Mozilla
refuses to change the selected radio button away from the default). I can get
round this by changing the way I use label tags - using the <label
for="mybuttons"> method rather than wrapping the form elements directly.

Reproducible: Always

Steps to Reproduce:
Create a webpage with <label> tag wrapping around more than one <input
type="radio"> tag.



Expected Results:  
Should let you select the radio button you want to select!
P.S. Have just checked the HTML specifications. It's not correct to wrap
multiple elements in one LABEL. I will leave it up to your good judgement
whether this slightly odd behaviour should be "fixed" in Firefox, or whether it
should remain as a lesson to people who don't read the specs quite as often as
they should.
I would say this is invalid. IE6 doesn't support this kind of thing.
Opera8.0b does basically the same thing as Mozilla, but in Opera, when you click
on a radio button you are able to select it.
Maybe that is something that Mozilla should be doing also?
Assignee: firefox → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Do we actually break any existing pages? (I think we catch the event when people
click on LABEL and give the first form control in that LABEL element focus.)
This is a duplicate; please find the original, which has some discussion on what
should be happening and why, and mark this duplicate.
Whiteboard: DUPEME
It looks related to bug 213519 which looks a bit related to bug 214368.

However, it really is bug 229925.

*** This bug has been marked as a duplicate of 229925 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.