You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature in detail (code, mocks, or screenshots encouraged)
Currently the checkbox component is implemented as a button element. This setup doesn't trigger native form validation on submit when the checkbox is required but not checked, as it lacks a real input type="checkbox". Could you consider adding a hidden native checkbox within the custom component? Implementing this would not only ensure compatibility with standard HTML form validation but also enhance accessibility and user experience by leveraging the browser's built-in validation.
What type of pull request would this be?
None
Provide relevant links or additional information.
I am currently adding the following right above the Checkboxprimitive.Root to make it work:
The text was updated successfully, but these errors were encountered:
zommerberg
changed the title
Add a hidden native input element for the checkbox.
Native form validation for the checkbox component with a hidden checkbox
Apr 10, 2024
Describe the feature in detail (code, mocks, or screenshots encouraged)
Currently the checkbox component is implemented as a button element. This setup doesn't trigger native form validation on submit when the checkbox is required but not checked, as it lacks a real input type="checkbox". Could you consider adding a hidden native checkbox within the custom component? Implementing this would not only ensure compatibility with standard HTML form validation but also enhance accessibility and user experience by leveraging the browser's built-in validation.
What type of pull request would this be?
None
Provide relevant links or additional information.
I am currently adding the following right above the Checkboxprimitive.Root to make it work:
The text was updated successfully, but these errors were encountered: