-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop recommending using pattern="[0-9]*"
on number inputs
#2323
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36degrees
changed the title
Remove pattern attribute numbers
Stop recommending using Aug 19, 2022
pattern="[0-9]*"
on number inputs
✅ You can preview this change here:
To edit notification comments on pull requests, go to your Netlify site settings. |
We previously recommended using `pattern="[0-9]*"` on number inputs to prompt iOS to display the numeric keypad. This has been unnecessary since Safari 12.2, when support for the standardised `inputmode` attribute was added to Safari. We stopped using the `pattern` attribute on the date input component [1] in v4.1.0 (released in May 2022) as the proportion of GOV.UK visitors using versions of iOS 12.x and below had fallen to 0.08% of total traffic. [1]: alphagov/govuk-frontend#2599 Co-authored-by: Calvin Lau <77630796+calvin-lau-sig7@users.noreply.github.com>
See previous commit for details.
36degrees
force-pushed
the
remove-pattern-attribute-numbers
branch
from
August 19, 2022 15:53
130c31f
to
62aead4
Compare
calvin-lau-sig7
approved these changes
Aug 19, 2022
gtvj
added a commit
to govuk-one-login/authentication-frontend
that referenced
this pull request
Aug 26, 2022
This update reflects a recent change to GOV.UK Design System recommendations for using pattern attributes on number inputs. The Design System update is described at: alphagov/govuk-design-system#2323
gtvj
added a commit
to govuk-one-login/authentication-frontend
that referenced
this pull request
Aug 26, 2022
This update reflects a recent change to GOV.UK Design System recommendations for using pattern attributes on number inputs. The Design System update is described at: alphagov/govuk-design-system#2323
gtvj
added a commit
to govuk-one-login/di-account-management-frontend
that referenced
this pull request
Aug 26, 2022
This update reflects a recent change to GOV.UK Design System recommendations for using pattern attributes on number inputs. The Design System update is described at: alphagov/govuk-design-system#2323
36degrees
added a commit
that referenced
this pull request
Sep 12, 2022
We stopped recommending using the `pattern` attribute on number inputs in #2323 but I missed this reference in the guidance for the text input component and the bank details pattern. We still tell users to turn off HTML validation in the broader 'question pages' pattern – that hasn't changed – but now that we're not using the pattern attribute there's no need to call it out in these specific places.
36degrees
added a commit
that referenced
this pull request
Sep 12, 2022
We stopped recommending using the `pattern` attribute on number inputs in #2323 but I missed this reference in the guidance for the text input component and the bank details pattern. We still tell users to turn off HTML validation in the broader 'validation' pattern – that hasn't changed – but now that we're not using the pattern attribute there's no need to call it out in these specific places.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We previously recommended using
pattern="[0-9]*"
on number inputs to prompt iOS to display the numeric keypad.This has been unnecessary since Safari 12.2, when support for the standardised
inputmode
attribute was added to Safari.We stopped using the
pattern
attribute on the date input component in v4.1.0 (released in May 2022) as the proportion of GOV.UK visitors using versions of iOS 12.x and below had fallen to 0.08% of total traffic.