This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11212 - Make all the radio button group suffering from being missing (instead of only radio's with the required attribute)
Summary: Make all the radio button group suffering from being missing (instead of only...
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2010-11-04 00:21 UTC by Mounir Lamouri
Modified: 2011-08-04 05:16 UTC (History)
8 users (show)

See Also:


Description Mounir Lamouri 2010-11-04 00:21:36 UTC
Currently, when a radio button is required, it will suffer from being missing if no radio elements in the radio button group is checked. However, radio elements in the group will not suffer from being missing if they do not have the required attribute. In other words, if you try to style invalid elements with :invalid, and do:
<input type='radio' name='s' value='M' required>
<input type='radio' name='s' value='F'>
only the first element will be styled.

I think we should move the requirement to the radio button group that way: "The radio button group suffers from being missing if one of the input elements in the radio button group is required and all of them have a checkedness that is false." and radio elements would have this constraint: "If the radio button group is suffering from being missing, the element is suffering from being missing.".

That way, all radio elements in the same radio button group will have the same validity state. That would be less annoying for authors and error proof while making things clearer (IMO).
Comment 1 Doug Wright 2010-11-04 10:08:25 UTC
See related bug 10833.
Comment 2 Doug Wright 2010-11-04 10:18:52 UTC
(In reply to comment #1)
> See related bug 10833.

Ignore me
Comment 3 Ian 'Hixie' Hickson 2011-02-10 02:19:30 UTC
I replied to this last month, here:

I will reply to its only reply so far in due course, and then update this bug accordingly:
Comment 4 Mounir Lamouri 2011-02-10 09:20:06 UTC
FWIW, it's implemented in current Firefox betas.
Comment 5 Ian 'Hixie' Hickson 2011-03-04 23:42:34 UTC
Opera does what the spec says; Firefox does what this proposal says.
Are there any other implementations of required="" on radio buttons?
Comment 6 Mounir Lamouri 2011-03-06 13:09:46 UTC
Anne, I think you agreed with this change when I sent an email to the mailing list. Do Opera has plan to update its implementation?
Comment 7 Anne 2011-03-06 14:00:40 UTC
No immediate plans, but we are definitely cool with changing our behavior for the better in due course. That's even easier if the specification requires it to be different and there's testcases effectively "blaming" us for being too fast with implementing this stuff :-)
Comment 8 Ian 'Hixie' Hickson 2011-05-06 00:38:19 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Accepted
Change Description: see diff given below
Rationale: see discussion above.
Comment 9 contributor 2011-05-06 00:38:34 UTC
Checked in as WHATWG revision r6094.
Check-in comment: Make it so that if you make one <input type=radio> required, they all end up required.
Comment 10 Michael[tm] Smith 2011-08-04 05:16:24 UTC
mass-move component to LC1