APP-11Recommended
Say why a control is unavailable
When a control can't be used yet, say why in visible text next to it, and what would make it work.
How to do it
Prefer an enabled control that explains the problem when pressed, because disabled buttons can't take focus and many people never find out why. When you must disable, link the reason with aria-describedby. Never disable a form's submit button to signal invalid fields. Let people submit and show the errors next to the fields.
Examples
HTML example
<button type="button" aria-disabled="true" aria-describedby="export-reason">Export to CSV</button>
<p id="export-reason">Exports are part of the Team plan. <a href="/billing">Change plan</a></p>
How to check
A browser test finds every disabled button and every aria-disabled="true" element. Each has an aria-describedby that points to visible, non-empty text.
Related rules
- AXS-28 Explain form errors next to the field in Accessibility
- APP-47 Let the server say what each user may do in Web app interface
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/app-ui/data-views/disabled-with-reason">Agent Wranglers web app interface playbook</a>. In code you write, add a comment next to it with the same link.