Element.ariaDisabled is an instance property that reflects the aria-disabled attribute. Learn the "true" / "false" strings, when to prefer native disabled, and how to get or set the property from JavaScript—with five examples and try-it labs.
01
Kind
Instance property
02
Type
String
03
Values
"true" · "false"
04
Reflects
aria-disabled
05
Status
Baseline widely
06
Prefer native
button / input disabled
Fundamentals
Introduction
A disabled control should still be visible (perceivable) but not operable—no clicks, no edits, no activation. Native form controls use the HTML disabled attribute for that.
Custom widgets that cannot use native disabled expose the same idea with aria-disabled. ariaDisabled is the JavaScript reflection of that attribute.
JavaScript
const el = document.getElementById("saveChanges");
console.log(el.ariaDisabled); // "true"
el.ariaDisabled = "false";
💡
Beginner tip
Prefer a real <button> or form control with HTML disabled when you can (MDN). Use ariaDisabled for custom widgets that cannot use the native attribute—and still block activation in script.
Concept
Understanding the Property
MDN: the ariaDisabled property of the Element interface reflects the value of the aria-disabled attribute, which indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Reflected attribute — mirrors aria-disabled.
Get / set — readable and writable string.
Two tokens — "true" and "false".
Baseline — widely available since October 2023 (MDN).
Foundation
📝 Syntax
JavaScript
ariaDisabled
Value
A string with one of the following values:
Value
Meaning (MDN)
"true"
The element and all focusable descendants are disabled, but perceivable, and their values cannot be changed by the user.
"false"
The element is enabled.
Pattern
📋 Custom Save Button (MDN Shape)
MDN starts with a custom button marked disabled, then enables it with ariaDisabled:
JavaScript
<div id="saveChanges" tabindex="0" role="button" aria-disabled="true">
Save
</div>
JavaScript
let el = document.getElementById("saveChanges");
console.log(el.ariaDisabled); // "true"
el.ariaDisabled = "false";
console.log(el.ariaDisabled); // "false"
When ariaDisabled is "true", also prevent click / Enter / Space handlers and apply disabled styling so the UI matches what assistive technologies hear.
Guidance
⚖️ Native disabled vs aria-disabled
HTML disabled
aria-disabled
Best on
<button>, inputs, selects, …
Custom widgets without native disabled
Built-in behavior
Browser blocks activation
You must block activation in script
Focus
Typically not focusable when disabled
Often still focusable (perceivable)
MDN advice
Prefer when possible
Use only when needed
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Read
el.ariaDisabled
Disable
el.ariaDisabled = "true"
Enable
el.ariaDisabled = "false"
Prefer native
button.disabled = true when possible
MDN status
Baseline Widely available
Snapshot
🔍 At a Glance
Four facts about Element.ariaDisabled.
Kind
get / set
Instance
Type
string
true / false
Reflects
aria-disabled
Attribute
Baseline
widely
Oct 2023+
Hands-On
Examples Gallery
Examples follow MDN Element: ariaDisabled. Labs use a custom role="button" widget so you can safely read and write the property.
📚 Getting Started
Read the reflected value and follow MDN’s enable update.
Example 1 — Read ariaDisabled
Log the current disabled state from a custom button.
JavaScript
const el = document.getElementById("saveChanges");
console.log(el.ariaDisabled);
// HTML includes: aria-disabled="true"
Element.ariaDisabled is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline Widely available
Element.ariaDisabled
String true / false — reflects aria-disabled.
BaselineWidely available
Google ChromeSupported (ARIA reflection)
Yes
Microsoft EdgeSupported (ARIA reflection)
Yes
Mozilla FirefoxSupported (ARIA reflection)
Yes
Apple SafariSupported (ARIA reflection)
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNo ariaDisabled IDL — use setAttribute
No
ariaDisabledBaseline
Bottom line: Use ariaDisabled to get/set aria-disabled on custom widgets. Prefer native disabled when possible. Keep visuals and event handlers in sync with the token you set.
Wrap Up
Conclusion
ariaDisabled reflects aria-disabled so custom widgets can expose a perceivable-but-disabled state with "true" and "false". Prefer native disabled when you can; when you use ARIA, keep styling and activation logic aligned with the property.
Hide the control completely when you only mean “disabled”
Forget focusable descendants when setting "true"
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaDisabled
Reflected aria-disabled string for custom disabled widgets.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
Two values
true · false
Tokens
🔍03
Perceivable
but not operable
Meaning
✅04
Baseline
widely available
Status
🎯05
Prefer native
HTML disabled
Rule
❓ Frequently Asked Questions
It reflects the aria-disabled attribute as a string ("true" or "false"), indicating the element is perceivable but disabled—so it is not editable or otherwise operable.
No. MDN marks Element.ariaDisabled as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
The strings "true" (disabled but still perceivable) or "false" (enabled).
In JavaScript you assign the strings "true" and "false", not the boolean literals true/false. The property reflects the ARIA attribute value.
Yes when possible. Prefer <button> or form controls with the HTML disabled attribute—they have built-in semantics and do not require ARIA (MDN).
Yes. Reading and writing ariaDisabled updates the reflected aria-disabled attribute. Also block activation and match disabled styling when you set "true".
Did you know?
Unlike HTML disabled (which often removes the control from tab order), aria-disabled="true" usually keeps the element focusable so users can still discover it—while your script must prevent it from doing anything.