Skip to main content
🎉 A11y Issue Detection Agent is now live! Detect accessibility issues like a WCAG expert with AI. Try now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

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.  

Incorrect Sample
Copy icon Copy

In the following corrected example, the aria-disabled="true" attribute is added to correctly communicate the disabled state:

Correct Sample
Copy icon Copy

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-disabled attribute explicitly set to true.
  • You can use the disabled property instead of aria-disabled for buttons declared with native HTML tag. However, non-native implementations must only use aria-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





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle