WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: HTML disabled or aria-disabled on checkbox

for

From: glen walker
Date: Jun 7, 2023 7:00AM


If you follow the first rule of ARIA,
https://www.w3.org/TR/aria-in-html/#rule1, then you'd use the "disabled"
HTML attribute.

The "disabled" HTML attribute will not only provide the styling but will
also provide the *behavior* of an inactive element. You can't click on it
or tab to it or press enter/space on it. It's inactive state will be
conveyed to assistive technology if you navigate to that element using some
navigation method of the AT, for example, the down arrow with a screen
reader.

The aria-disabled attribute will *only* provide a hint to assistive
technology that the element is inactive. It won't give you any behavior.
You'd have to make the element inactive by ignoring events on it via
javascript.