[Radio Group] Issue
s-hitsan opened this issue · comments
Description
How to set it to readOnly? There is no way to do it...
Link to Reproduction (or Detailed Explanation)
https://ark-ui.com/docs/components/radio-group
Steps to Reproduce
It doesn't have such property. No Group, no Item. Also such problem with checked property. We have only defaultChecked property
Ark UI Version
@ark-ui/react@2.2.3
Framework
- React
- Solid
- Vue
Browser
No response
Additional Information
No response
It seems there's been some confusion regarding the usage of readOnly
attributes on radios or checkboxes. According to the W3C specifications and ARIA practices, readOnly
is not a valid attribute for radio buttons or checkboxes. These input types are designed for interaction, and their state (selected or not) is inherently modifiable by the user. If you aim to prevent modification, consider using the disabled
attribute instead. However, note that disabled
inputs are not submitted with the form and are not focusable.
For managing the checked state without user modification, instead of readOnly
, you might rely on controlling the component's state programmatically, ensuring it doesn't change in response to user interactions.