-
Notifications
You must be signed in to change notification settings - Fork 715
[selectors-4] Clarify :blank application to radio buttons etc. #3339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The very first thing that came to mind for me was that This is because if a checkbox is not checked, it visually tends to appear blank. If |
I like the last definition, i.e. let
|
@Loirooriol Overall I agree with you, except for checkboxes: checkboxes can also be grouped and it makes sense to treat them like radio buttons. Checkbox groups are essentially like radio button groups, except that the items are non-exclusive. You'll see surveys, for example, vary between checkboxes and radio buttons for the same format of question, except that they use checkboxes when they want to allow multiple selections. |
@fantasai "checkboxes can also be grouped". Any reference to this? In the spec I can find the radio button group concept and the RadioNodeList interface. I can't find anything analogous for checkboxes. Multiple checkboxes can have the same name, not sure if this is what you mean. But this also applies to text inputs, and doesn't mean they are grouped in some special way. And I think it's natural to say that a form control suffers from being missing if it's blank and it's required (and possibly other constraints like mutability). So I would define :blank this way, and checkbox groups are not considered when determining if it suffers from being missing. |
Andrew Fedoniouk points out that it's not entirely clear whether/how :blank applies to radio buttons etc.
https://lists.w3.org/Archives/Public/www-style/2018Nov/0028.html
We should clarify this. Some options are:
-:not(:blank) applies when a radio button or checkbox is has a non-blank 'value' and is checked (will submit if not disabled); :blank applies otherwise
Probably the most simple definition is 1; it largely falls out of the existing definition. However the last definition is perhaps more useful. It would be good to hear from authors here what they expect.
The text was updated successfully, but these errors were encountered: