-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersrsp:Checkboxrsp:Switch
Description
🐛 Bug Report
It turns out that the <input readonly>
attribute only applies to text inputs, not checkboxes and radios according to the HTML spec. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly.
🤔 Expected Behavior
We should not have the readonly
attribute returned by useToggle
and useRadio
because it is invalid on these elements.
💁 Possible Solution
Instead of readonly
, we should use aria-readonly
which is allowed on checkbox, switch, and radio roles. Apparently it has inconsistent AT support though, but probably better than nothing. See w3c/aria#1309 (comment). cc. @jnurthen
🧢 Your Company/Team
RSP
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersrsp:Checkboxrsp:Switch