aria icon indicating copy to clipboard operation
aria copied to clipboard

Why is aria-readonly allowed for checkboxes and radios?

Open scottaohara opened this issue 5 years ago • 30 comments

Leaving aside that HTML mentions that readonly is only for text editable form controls, the aria-readonly attribute is introduced with the following text:

Indicates that the element is not editable, but is otherwise operable.

Regarding checkboxes and radio buttons, they can only be toggled as checked or not (and mixed re: checkboxes). So if their state cannot be edited, then they are not operable.

I understand the argument of wanting to be able to expose a non-editable checkbox, for example, on a confirmation screen where other form controls are present, but in a read only state. But why couldn't this be done with a disabled checkbox (native disabled attribute or aria-disabled) which is more accurate of the control's state? Even if the argument is "we would want the checkbox to be fosusable and not styled as disabled", aria-disabled has that covered since it won't automatically style or remove the checkbox out of the focus order by default.

Beyond thinking that aria-readonly should not be allowed on radios and checkboxes, I'd also say it thus should not be allowed on radiogroup.

scottaohara avatar Aug 11 '20 14:08 scottaohara