Do you use input type=number? This is interesting...

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Post Reply
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Do you use input type=number? This is interesting...

Post by Albert Wiersch »

I came across this article a few days ago.

If you use

Code: Select all

<input type="number">
then you may want to read this interesting article.

It talks about problems with it, including with accessibility.

It recommends this instead:

Code: Select all

<input type="text" inputmode="numeric" pattern="[0-9]*">
Here's the link: Why the GOV.UK Design System team changed the input type for numbers
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply