aria-disabled
Ensure that buttons that are intended to be non-interactive must have the aria-disabled attribute set to true.
Rule Severity : Serious
Description
Buttons that are intended to be non-interactive must have the aria-disabled attribute set to true. This ensures that assistive technologies, such as screen readers, correctly identify the button as disabled to the user. Without this attribute, a user might try to interact with a button that is not functional, leading to confusion and frustration.
Â
The aria-disabled rule aligns with WCAG Success Criterion 4.1.2 (Name, Role, Value), which requires that states, properties, and values that can be set by the user can be programmatically set and determined.
Â
Examples
 In the following example, a button is visually styled to appear disabled but lacks the programmatic state to inform assistive technologies. Â
In the following corrected example, the aria-disabled="true" attribute is added to correctly communicate the disabled state:
How to fix?
To fix violations of the aria-disabled rule, follow these steps:
- Identify buttons that are intended to be non-interactive.
- Ensure that these buttons have the
aria-disabledattribute explicitly set totrue. - You can use the
disabledproperty instead ofaria-disabledfor buttons declared with native HTML tag. However, non-native implementations must only usearia-disabled.
Reference
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!