Skip to content

Conversation

@3Dgoo
Copy link
Contributor

@3Dgoo 3Dgoo commented Nov 18, 2020

Fixing OptionsetField template so that required works like the default template

@michalkleiner
Copy link
Collaborator

Is this still relevant @3Dgoo? If so, can you please rebase?

Fixing OptionsetField template so that required works like the default template
@3Dgoo
Copy link
Contributor Author

3Dgoo commented Jun 12, 2025

I have rebased this as requested. Yes, this is still relevant. Let me know if there is anything else you need from me.

@michalkleiner
Copy link
Collaborator

Does it add the attribute to all the options then, is that valid?

@3Dgoo
Copy link
Contributor Author

3Dgoo commented Jun 13, 2025

Yes it does add the attribute to all the options. I believe this is valid and correct, yes.

@3Dgoo
Copy link
Contributor Author

3Dgoo commented Jun 13, 2025

https://html.spec.whatwg.org/multipage/input.html#the-required-attribute

For radio buttons, the required attribute is satisfied if any of the radio buttons in the group is selected.
To avoid confusion as to whether a radio button group is required or not, authors are encouraged to specify the attribute on all the radio buttons in a group. Indeed, in general, authors are encouraged to avoid having radio button groups that do not have any initially checked controls in the first place, as this is a state that the user cannot return to, and is therefore generally considered a poor user interface.

@michalkleiner michalkleiner merged commit b319010 into unclecheese:master Jun 13, 2025
9 checks passed
@3Dgoo 3Dgoo deleted the patch-1 branch June 13, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants