Skip to content
easeweb
Search topics

Disabled buttons that can't be found or say why

A Place order button is greyed out until the terms box is ticked, but it is either announced as ready or skipped by Tab, and nothing says what is missing.

WCAG 2.2
SC 4.1.2A
Required by
Section 508 · EN 301 549 (EU)
Broken <button type="submit" disabled>Place order</button>
The accessibility problem illustrated: Motor:Why can't I place the order?
01

The problem

Keyboard and screen reader users either hear that a greyed-out button is ready when it isn't, or never find it, and nobody is told what they still need to do

02

Try it

Before ticking the box, try to place the order with Tab and Enter

  • Broken 1: press Tab from the checkbox to Place order, then press Enter. Can you reach the button, and does anything tell you what is missing? The panel shows what a screen reader announces.

  • Broken 2: press Tab from the checkbox to Place order, then press Enter. Can you reach the button, and does anything tell you what is missing?

  • Apply a fix. Try again before ticking the box: can you reach the button, and does anything tell you what is missing?

Broken Can you fix this?

Delivery and returns

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Keep the button reachable, and say what is still needed

Before

A button greyed out by a class

<label><input type="checkbox" name="terms"> I accept the terms</label><button type="submit" class="btn is-disabled">Place order</button>
What is wrong2 points
  • The button looks unavailable, but only the class says so: it is announced as "Place order, button".
  • pointer-events: none stops the mouse but not the keyboard, so Enter still submits the form.
After

A button that stays enabled and explains when pressed

<label><input type="checkbox" name="terms" id="terms" aria-describedby="terms-error">  I accept the terms</label><p id="terms-error" class="error" hidden>Tick the box to accept the terms.</p><button type="submit">Place order</button>
How it is fixed4 steps
  1. Leave the button enabled, with no disabled state at all. It is always reachable, always readable, and always does something.
  2. Write the error beside the checkbox, hidden, and link it to the checkbox with aria-describedby.
  3. On submit, if the box isn't ticked, stop the submit, show the error, set aria-invalid on the checkbox and move focus there. A screen reader reads the label, the invalid state and the error.
  4. When the box is ticked, hide the error and remove aria-invalid.

This fixes both Befores and passes 4.1.2. There is no disabled state to expose, so there is nothing to get wrong.

04

Design ideas

A button that isn’t ready can still say why

Four ways to draw Place order while it can’t go yet. In the first two the terms box is empty: press the button, then tick the box and press again. In the last two it is ticked: press Place order, then press Enter again while it is sending. Three say what is happening; the last looks busy, but a second press sends a second order.

In the design file

  • Draw how Place order looks before it can be used. Keep the text easy to read, and change more than the colour, such as a dashed border.
  • Write next to the button what people need to do, such as “Tick the box to accept the terms”.
  • Write the greyed-out text’s contrast ratio next to its colour, and keep it readable. WCAG sets no minimum for unavailable buttons; the example here has 5.99:1.
  • Draw the button in a Windows contrast theme, where it must still look like a button and still look unavailable.

Passes

  • A button that says what it needs An outlined pill, its 2px edge and label in #2b2724 at 14.81:1, reads “Accept the terms to order”, then fills in as Place order once the box is ticked. The reason is the label, so there is no hint to find, at the cost of a longer button while it waits.
  • Before you order

    Delivery slot chosen

    Accept the terms

    A checklist above the button A soft #f4f1ed card lists what the order still needs, in #2b2724 at 13.15:1: a ticked circle for the delivery slot, an empty one for the terms, and the words change too, so it doesn’t rest on colour. People see what is left before they press, and it grows to any number of steps; it costs a few lines above the button.
  • Spinner in a button that keeps its place Pressed, Place order keeps its shape, place and label, white on #2b2724 at 14.81:1, with a small spinner, and a line under it says “Placing your order…”. It is marked unavailable while it sends, so it is announced that way and a second press sends nothing; the spinner stops when the order is placed, after 2 seconds here.

Fails

  • Button that shrinks into a spinnerWCAG 4.1.2 Pressed, the pill shrinks to a 44px circle with a spinner, and only a class says it is busy. It is still announced as “Place order, button”, and Enter on it while it spins sends a second order.
05

Verify the fix

6 checks, no mouse.

Test with: Keyboard, Screen reader, Forced colors, Zoom

0 of 6 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared button component changes.

How screen readers handle aria-describedby

Limits

This is a starting pattern, not a guarantee for every form. Screen readers word aria-disabled and disabled differently ("dimmed", "unavailable", "disabled"), and some read aria-describedby only after a pause or on request. The error wording and its place on the page depend on the rest of your form. Test the whole journey, from an empty form to a placed order, with the assistive technology your users have.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service