You Asked

Disabled submit button: is it a WCAG failure?

7 min read

Hannah asksAccessibility auditor

I'm auditing a violin maker's website for an agency. On the “Contact us” page, the “Send message” button stays grayed out until the required fields are filled in.

I filled in everything, but typed the email address without the @ sign. The button stayed gray, and not a single message appeared.

I know it's bad practice. But can I log it as a WCAG failure, and under which success criterion? Someone suggested 4.1.2, Name, Role, Value, because it covers states. I'm not convinced.

Mikhail Shaymardanov answersWeb Quality and Accessibility Expert

Grayed-out submit buttons come up often in my form audits, and the answer depends on what the person has already typed. I'll show you how I test the form in three states, what I write in the report, and how to fix it.

What the grayed-out button doesn't say


Screenshot: the Sowerby Violins “Contact us” page. On the left, the heading and a photo of a workbench with an unvarnished viola and a varnished violin; on the right, the form filled in for Casey Fenwick with the address “casey.fenwick.example.com”, the instrument “Viola” and a message about a bridge, then a grayed-out “Send message” button. No error message appears.Marker 1. The Email address field, filled in with casey.fenwick.example.com, with no @ sign. Marker 2. The “Send message” button, grayed out.
On the Sowerby Violins “Contact us” page, the address has no @ signmarker 1 and “Send message” stays grayed outmarker 2: no text says what's blocking it.

#A disabled submit button blocks the form without saying what's missing

A disabled submit button blocks the form for everyone, and on the violin maker's page, nothing says what's holding it back. The disabled attribute keeps the button from getting clicks or keyboard focus, so neither the mouse nor the keyboard can activate it.

Someone who magnifies the screen can't even see what's blocking it. A full-screen magnifier set to 4x shows only 360 of the 1,440 pixels across the screen. At that zoom, the form showed us nothing but the end of the message and the pale button. The faulty address sat more than 300 pixels higher up. The person clicks, nothing happens, and nothing on screen tells them why.

Screenshot: the Sowerby Violins “Contact us” page magnified four times. Only the end of the message field, “week?”, and the grayed-out “Send message” button are visible; the address field is off screen.Marker 1. The “Send message” button, grayed out, the only part of the form still in view.
Magnified four times around “Send message”marker 1, the page shows only the end of the message and the grayed-out button: the rejected address is out of view, and no text points to it.

That pale gray tempts auditors to log a contrast failure, which would be a mistake. WCAG, the international web accessibility guidelines, set no contrast requirement for an inactive component like this button. Their publisher, the W3C, gives this very example on its page on minimum contrast: a submit button that can't be activated until the required fields are filled in.


#A grayed-out button becomes a WCAG failure when no text names the error

A grayed-out submit button becomes a failure when the form has detected an input error and no text describes it. The test asks three questions about the button: does Tab reach it, does Enter submit the form from a text field, and does any text say what's blocking it? Only the last one decides, and you ask it in three states of the form: blank, with one field left empty, and with an address missing its @ sign.

#What does the keyboard test show?

On the form in the question, the first two answers are no: Tab skips the button, and Enter submits nothing. When the first submit button in a form is disabled, the browser never submits the form from that key.

Click the demo, then press the key shown, or move on with “Next step”. Escape leaves the demo.
5 steps

On the Sowerby Violins “Contact us” page, Enter in the address field sends nothing, and Tab from “Your message” skips the disabled “Send message” button.

I mention this in the report but log no keyboard failure. The WCAG keyboard criterion, 2.1.1, only asks that the keyboard can do what other input methods do. Here the mouse can't send the form either.

#Which form states go in the report?

On the blank form, I log nothing: nobody has typed or skipped anything yet. I just recommend adding a sentence before the form that says what makes the button usable.

When everything is filled in except “Your name,” I log a failure. The W3C's page on success criterion 3.3.1 counts required information the user left out as an input error. The page's script has detected the missing name, since it keeps the button grayed out. This case is debated, and the last section explains my choice.

The address with no @ sign is the clearest failure. I log both cases under success criterion 3.3.1, Error Identification. It requires that when an input error is detected automatically, the page points out the field in error and describes the error in text. Here, the script detected the error and describes it nowhere.

#How do I justify the failure in the report?

The W3C documents common ways to fail its criteria, and none covers the empty name or the address with no @ sign. Its page on 3.3.1 lists ways to pass and no failures at all. The form isn't off the hook, because these lists are only informative, meaning not required, and the W3C judges a page by the success criterion itself. Your justification makes the link: write that the script detects the error but never puts it into words, and quote the criterion.

A script's check in the browser counts as automatic detection. The W3C lists this kind of input validation among its ways to pass this criterion. If the European Accessibility Act covers the site, also cite EN 301 549, the European standard revised to support it. Its clause 9.3.3.1 adopts this criterion.

The criterion suggested in the question, 4.1.2 Name, Role, Value, stays out of the report. The W3C notes that standard HTML controls already meet it when they follow the specification, and a native disabled button passes its state on to screen readers.

WCAG audit: how it works and what the report's score counts

#Keep the button enabled and describe the error in text

Keep the submit button enabled, and when someone clicks it, show the error in a message under the field. Link that message to the field with aria-describedby, so screen readers announce it with the field, and mark the field as invalid with aria-invalid="true". The GOV.UK Design System advises avoiding disabled buttons where possible, since their contrast is poor and they can confuse some people.

The page does change its look, because the error has to be described in text where everyone can see it. The message also gives an example address, name@example.com. That covers success criterion 3.3.3, Error Suggestion.

Avoid

Screenshot: the “Email address (required)” field filled in with “casey.fenwick.example.com”, then the grayed-out “Send message” button, with no message.Marker 1. The “Send message” button, grayed out, with no explanation.
<label for="email">Email address (required)</label>
<input id="email" name="email" type="email" required>
<button type="submit" disabled>Send message</button>

Correct

Screenshot: the same field with a red border and, below it, the message “Error: the @ sign is missing. Example: name@example.com”, then the “Send message” button in black, enabled.Marker 1. The “Send message” button, enabled. Marker 2. The message “Error: the @ sign is missing. Example: name@example.com”, under the field.
<form action="/contact" method="post" novalidate>
  <!-- … -->
  <label for="email">Email address (required)</label>
  <input id="email" name="email" type="email" required
         aria-invalid="true" aria-describedby="email-error">
  <p id="email-error">
    Error: the @ sign is missing. Example: name@example.com
  </p>
  <!-- … -->
  <button type="submit">Send message</button>
</form>
Before, the address with no @ sign leaves “Send message”marker 1 grayed out without a word; after, the buttonmarker 1 stays enabled and, on click, the messagemarker 2 says what's missing, with an example.

With the button enabled, Enter in the address field submits the form again.

The browser's own check also describes the error in text, in a small pop-up bubble for fields marked required or type="email". Among several drawbacks, the W3C notes that, depending on the browser, these bubbles don't grow when the person zooms in on the page. In the fixed code, the novalidate attribute turns that check off on submit. The page's script then writes its own messages into the page, where they scale with everything else. It also moves focus to the first field in error, the way the browser's check does.

#Can you keep the button inactive with aria-disabled?

Yes, on two conditions. First, replace disabled with aria-disabled="true", and never keep both. The button stays reachable with Tab and screen readers are told it's disabled. The script then has to block the click and the submission itself. Second, a visible sentence next to the button says what's missing, tied to the button with aria-describedby.

This option passes as long as the sentence names the field and describes the error. I still recommend the enabled button, which takes less scripting. We cover how to word the error messages in a separate guide.

Accessible forms in HTML: required fields, error messages and validation

#The empty required field divides the W3C: log it anyway

When only a required field is left empty, the W3C's definition of an input error supports two opposite answers, and I log the failure anyway. The definition opens with “information provided by the user that is not accepted.” An empty field provides nothing, so by that reading there's no error yet. But its note counts required information the user left out among those errors.

Screenshot: the Sowerby Violins “Contact us” page with the “Your name” field empty, the address “casey.fenwick@example.com”, the instrument “Viola” and the message filled in, then the grayed-out “Send message” button, with no message.Marker 1. The “Your name” field, left empty. Marker 2. The “Send message” button, grayed out.
On the Sowerby Violins “Contact us” page, only “Your name” is emptymarker 1 and “Send message” stays grayed outmarker 2: nothing on screen connects the button to the missing field.

This question was raised in a public W3C ticket on GitHub, issue 1512. The issue was closed in May 2024 with no change to the documentation.

That said, the W3C is already preparing WCAG 3. Its draft adds a supplemental requirement, still in development: explain why an element is disabled. Its example is precisely a submit button grayed out until the required fields are filled in. It's only a draft, and the W3C warns that the final requirements will change.

In my audits, then, I log the empty field under 3.3.1 and quote that definition's note in the justification. The fix I give is the same in every state: an enabled button, and a message under the field in error.



Share this article

Frequently asked questions

Yes. The browser passes a disabled button on to screen readers along with its disabled state, as the W3C's HTML accessibility mappings specify, so the button is read out as one that can't be used.

But the Tab key still skips it, and the state alone doesn't say what's holding it back.

The GOV.UK Design System advises avoiding disabled buttons: their contrast is poor and they can confuse some people. It only accepts them when user research shows they make the interface easier to understand.

Even then, the gray only signals that something is missing. Saying what takes text, under the field or next to the button.

Not by name. Its Annex I asks for websites that follow the four principles behind WCAG, without naming any interface component. EN 301 549, the European standard revised to support the Act, spells those principles out with WCAG's success criteria. Its clause 9.3.3.1 adopts the WCAG criterion on error identification.

Under that criterion, a grayed-out button breaks no rule by itself. An error the form detects and describes nowhere in text does.