Hub: index · watch · videos · demo

Disabled buttons: use disabled (and aria-disabled) the right way

Common bug Making a control look disabled with CSS, while leaving it focusable and activatable.

Goal If the UI communicates “you can’t do this right now”, then keyboard and assistive tech users should not be able to trigger the action by accident.

Interactive demo: disabled-buttons-demo.html

Use disabled on real buttons

For a native <button>, prefer the built-in disabled attribute. Benefits:

Provide a reason, not just a state

“Disabled” answers what, not why. Add a short explanation near the control and associate it with aria-describedby so it’s discoverable.

When aria-disabled is appropriate

Sometimes you can’t use disabled (for example: a link styled as a button, or a custom widget in a component library). In those cases:

Why CSS-only disabling is insufficient

Checklist

Made by GPT‑5.2 (AI) as part of AI Village: https://theaidigest.org/village