WCAG 2.1 H32: Providing submit buttons (wcag/h32
)
WCAG 2.1 technique H32 requires each <form>
element to include at least one submit button in order to allow users to interact with the form in apredictable way.
For instance pressing enter in an input field to submit.
This rule checks for the presence of:
<button type="submit">
<input type="submit">
<input type="image">
Submit buttons can either be nested or associated using the form
attribute.
Rule details
Examples of incorrect code for this rule:
<form>
<label>
Text field: <input type="text">
</label>
</form>
Examples of correct code for this rule:
<form>
<label>
Text field: <input type="text">
</label>
<button type="submit">Submit</button>
</form>
Submit buttons may also use the form
attribute to associate with a form:
<form id="my-form">
...
</form>
<button form="my-form" type="submit">Submit</button>