Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
<button>
not <input>
s for form submission
Both `<button type='submit'>Submit<button>` and `<input type='submit' value='Submit'>` can be used to submit a form. Historically `<input>` has been preferred because it’s better-supported by IE6 in that: - the `submit` attribute is mandatory on `<button>`, not on `<input>` - the `innerHTML` of a button will be submitted to the server, not the value (as in other browsers) Reasons to now use `<button>` instead: - IE6/7 support is no longer a concern (especially with deprecation of TLS 1.0 on the way) - Because an `<input>` element can’t have children, the pseudo-element hack[1] used to ensure the top edge of the button is clickable doesn’t work. Fixes alphagov#545 1. alphagov/govuk_frontend_toolkit@24e1906#diff-ef0e4eb6f1e90b44b0c3fe39dce274a4R79
- Loading branch information