Skip to content
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

Remove pattern="[0-9]*" from date inputs #259

Open
frankieroberto opened this issue Nov 7, 2024 · 1 comment
Open

Remove pattern="[0-9]*" from date inputs #259

frankieroberto opened this issue Nov 7, 2024 · 1 comment

Comments

@frankieroberto
Copy link

Currently the date inputs contain the pattern=[0-9]* attribute.

This was previously recommended in order to make mobile devices display the digit keyboard instead of the standard qwerty keyboard. However, inputmode="numeric" is now widely supported and a better way of achieving this.

pattern=[0-9]* causes a browser based validation message, which is not super accessible or well written. It can be turned off by adding the novalidate to the <form>, but people may forget to do this.

Given that pattern=[0-9]* is no longer included in the Date input in the NHS Design system, we should drop it from the React implementation too.

@frankieroberto
Copy link
Author

@mikemonteith fancy doing this? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant