What is being proposed?
A read-only variant for MuiSwitch, MuiCheckbox, and MuiRadio, distinct from disabled.
Why is this needed?
Follow-up from #272 / PR #328, which gave TextField/Select/Autocomplete a dedicated read-only look.
These three controls have no native readOnly support in MUI (unlike text-like inputs), and they currently have only disabled, which mutes the value and drops the control from the tab order even when the value itself still needs to be shown and announced, with no read-only treatment at all.
What will change?
- Behaviour: enforce read-only via controlled
checked + no-op onChange, since native readonly on checkbox/radio inputs doesn't block clicks
- Accessibility:
aria-readonly instead of aria-disabled, keeping the control focusable/announced
- Visual: likely closer to full saturation than the muted
--ds-surface-readonly wash used for text inputs, since the value is meaningful and being displayed, not unavailable
Interface changes (if any)
<Switch readOnly checked={value} />
<Checkbox readOnly checked={value} />
<Radio readOnly checked={value} />
Breaking change?
Next steps
A maintainer will review this issue.
If accepted, it will be marked as accepted and a PR may then be opened.
What is being proposed?
A read-only variant for
MuiSwitch,MuiCheckbox, andMuiRadio, distinct fromdisabled.Why is this needed?
Follow-up from #272 / PR #328, which gave
TextField/Select/Autocompletea dedicated read-only look.These three controls have no native
readOnlysupport in MUI (unlike text-like inputs), and they currently have onlydisabled, which mutes the value and drops the control from the tab order even when the value itself still needs to be shown and announced, with no read-only treatment at all.What will change?
checked+ no-oponChange, since nativereadonlyon checkbox/radio inputs doesn't block clicksaria-readonlyinstead ofaria-disabled, keeping the control focusable/announced--ds-surface-readonlywash used for text inputs, since the value is meaningful and being displayed, not unavailableInterface changes (if any)
Breaking change?
Next steps
A maintainer will review this issue.
If accepted, it will be marked as
acceptedand a PR may then be opened.