W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2010

[whatwg] Make radio button group suffering from being missing

From: Mounir Lamouri <mounir.lamouri@gmail.com>
Date: Thu, 04 Nov 2010 01:20:37 +0100
Message-ID: <4CD1FC55.3090208@gmail.com>
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
Received on Wednesday, 3 November 2010 17:20:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:28 UTC