Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

aria-disabled — disabled control state

aria-disabled tells assistive technologies that an element is perceivable but unavailable for operation. The attribute alone neither prevents actions nor removes the element from the focus order; the author must implement that behavior.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

aria-disabled="true" | aria-disabled="false"

aria-disabled="true" identifies an element as disabled but still perceivable. aria-disabled="false" is this state's default value; it does not override native disabled. This is not an HTML boolean attribute: explicitly supply "true" or "false" rather than relying on the attribute's presence.

Unlike native disabled, aria-disabled alone does not prevent activation, change the focus order, or provide disabled styling. Prefer native disabled when it meets the requirements. If an unavailable button must remain reachable with Tab, using aria-disabled also requires suppressing its action in script and visually indicating its state.

The state applies to the element and all its focusable descendants, so do not apply it indiscriminately to containers. Use it only where HTML rules and the element's role permit it. ARIA 1.2 deprecates its use as a global state, not the attribute itself.

In the example, the native button retains keyboard support, but the shared click handler returns before performing the action. CSS only signals unavailability; it does not enforce it.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>aria-disabled demo</title>
<style>
  button[aria-disabled="true"] { opacity: 0.6; }
</style>
<button type="button" id="save" aria-disabled="true">Save (unavailable)</button>
<p id="result">Actions: 0</p>
<script>
  const save = document.getElementById('save');
  const result = document.getElementById('result');
  let actions = 0;

  save.addEventListener('click', () => {
    if (save.getAttribute('aria-disabled') === 'true') return;
    actions += 1;
    result.textContent = `Actions: ${actions}`;
  });

  save.click();
  console.log(result.textContent);
</script>
</html>

Result

Actions: 0

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources