Skip to content

Commit

Permalink
PP-5366 - use inputmode and pattern attribute on numeric fields
Browse files Browse the repository at this point in the history
The Design System team have done some accessibility testing on `input
type="number"` and deemed them problematic. They have suggested using

`input type="text" inputmode="numeric" pattern="[0-9]*"`

instead as documented here alphagov/govuk-frontend#1449
  • Loading branch information
jonheslop committed Jun 26, 2019
1 parent 17b4252 commit d95ab44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/adhoc-payment/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
name="payment-amount"
data-non-numeric=""
type="text"
inputmode="numeric"
id="payment-amount"
value=""
autofocus=""
autofocus
data-validate="required currency"
data-confirmation="true"
data-confirmation-label="{{ __p('adhoc.currencyInput.confirmationLabel') }} "
Expand Down

0 comments on commit d95ab44

Please sign in to comment.