[whatwg] Make radio button group suffering from being missing
Mounir Lamouri
mounir.lamouri at gmail.com
Wed Nov 3 17:20:37 PDT 2010
Hi,
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).
I'm thinking of implementing that for Gecko 2.0/Firefox 4 so I would
like to know if you know any reason that would make the current behavior
more appropriate than the one described here.
--
Mounir
More information about the whatwg
mailing list