With regards to the aria-disabled attribute https://www.w3.org/TR/html-aria/#attr-disabled the first part is pretty clear: an element with a disabled attribute should not use aria-disabled="true" because its semantics is implicit and already conveyed by the disabled attribute.
However, I'm not fully sure I understand the second part:
Only use the aria-disabled attribute for elements that are not allowed to have a disabled attribute in HTML5
which seems to completely prohibit to use aria-disabled on some elements, e.g. a button element.
For example, seems to me there are cases where using aria-disabled on a button and keeping it focusable is beneficial. Avoiding a focus loss is one notable scenario. Discoverability of a feature is an important scenario as well.
The WAI-ARIA Authoring Practices 1.1 list some specific cases where making a control perceived as disabled but still focusable may be beneficial. A disabled attribute would make the control not focusable.
Also, in ARIA 1.1 it's stated that aria-disabled can be used in "All elements of the base markup". Same in ARIA 1.2.
I'm not an English native speaker so I might be a bit confused 🙂However, seems to me the current wording could be clarified a bit, as it sounds to completely prohibit the aria-disabled attribute for elements that are allowed to have a disabled attribute (e.g. buttons) while other specifications seems to allow it.
With regards to the
aria-disabled
attribute https://www.w3.org/TR/html-aria/#attr-disabled the first part is pretty clear: an element with a disabled attribute should not usearia-disabled="true"
because its semantics is implicit and already conveyed by thedisabled
attribute.However, I'm not fully sure I understand the second part:
which seems to completely prohibit to use
aria-disabled
on some elements, e.g. a button element.For example, seems to me there are cases where using
aria-disabled
on a button and keeping it focusable is beneficial. Avoiding a focus loss is one notable scenario. Discoverability of a feature is an important scenario as well.The WAI-ARIA Authoring Practices 1.1 list some specific cases where making a control perceived as disabled but still focusable may be beneficial. A
disabled
attribute would make the control not focusable.5.7 Focusability of disabled controls https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_disabled_controls
Same in 1.2: https://www.w3.org/TR/wai-aria-practices-1.2/#kbd_disabled_controls
Also, in ARIA 1.1 it's stated that aria-disabled can be used in "All elements of the base markup". Same in ARIA 1.2.
I'm not an English native speaker so I might be a bit confused 🙂However, seems to me the current wording could be clarified a bit, as it sounds to completely prohibit the
aria-disabled
attribute for elements that are allowed to have a disabled attribute (e.g. buttons) while other specifications seems to allow it.