mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Both `<button type='submit'>Submit<button>` and `<input type='submit' value='Submit'>` can be used to submit a form. We have historically[1] used `<input>` 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[2] used to ensure the top edge of the button is clickable doesn’t work. We’re seeing this bug[3] affect real users in research. 1. We inhereted our buttons from Digital Marketplace, here is me making that change in their code: https://github.com/alphagov/digitalmarketplace-frontend-toolkit/commit/8df7e2e79e53f85e26ca69d0439a5c7879323cd0#diff-b1420f7b7a25657d849edf90a70ef541 2. https://github.com/alphagov/govuk_frontend_toolkit/commit/24e1906c0d908f0e15609ad2376feb7dd56f5731#diff-ef0e4eb6f1e90b44b0c3fe39dce274a4R79 3. https://github.com/alphagov/govuk_elements/issues/545
1.0 KiB
1.0 KiB