This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This was was cloned from bug 15703 as part of operation convergence. Originally filed: 2012-01-25 03:13:00 +0000 Original reporter: Kent Tamura <tkent@chromium.org> ================================================================================ #0 Kent Tamura 2012-01-25 03:13:12 +0000 -------------------------------------------------------------------------------- http://dev.w3.org/html5/spec/Overview.html#selector-required > :required > The :required pseudo-class must match any element falling into one of the following categories: > - input elements that are required According to this definition, radio1 in the following example is not matched to ":required" though radio1 is invalid. I think it's inconsistent and we had better add an exceptional rule for radio button groups. <form> <input type=radio name=group1 id=radio1> <input type=radio name=group1 required> </form> ================================================================================ #1 Marat Tanalin | tanalin.com 2012-01-25 11:27:41 +0000 -------------------------------------------------------------------------------- By the way, radio buttons is a case where having @required attribute for fieldset would be handy: <fieldset required> <input type="radio" name="group1" id="radio1" /> <input type="radio" name="group1" /> </fieldset> So we could use FIELDSET:required instead of INPUT:required. ================================================================================
This would require "spooky action at a distance" in selectors. I think if you want :required to match, it's reasonable to require you to set the attribute also.