Earlier quoted context omitted.
Desktop support is also almost moot, though, right? What's the "desktop with virtual keyboard" use case?
Touchscreen pcs? Surface Pro users in particular would see this.
Why the Gov.uk Design System team changed the input type for numbers
91–100 of 177 posts
Re: Why the Gov.uk Design System team changed the input type for numbers
#92Earlier quoted context omitted.
To put it more succinctly and without unnecessarily referring to JavaScript semantics, type="number" is for quantities , not mere strings of digits . It's an unfortunate accident of the English language that both are commonly called ‘numbers’. We might not have had this confusion if some other language were the lingua franca of computing.
You can't entirely avoid referring to JavaScript semantics here, type="number" is for values appropriate to represent and work with as IEEE 754 doubles. That covers a lot of ground, by design. But a 'number' it isn't.
Though 'quantity' as described in another post still sounds the best given the sub 1 and add 1 buttons.
Re: Why the Gov.uk Design System team changed the input type for numbers
#93> However the inputmode attribute is now supported by all the mobile browsers we test in. This isn't extensive, which might be a tad misleading if you don't double check. They test on Chrome & Samsung for Android, and iOS is only the one engine. And those three browsers seem to be the only mobile browsers that have implemented it. (Well, Opera Mobile as well). [0] Desktop support is also extremely spotty. This seems…
Trying this out in the latest Desktop Firefox, the numberinput and pattern attributes seem to have no effect, and it behaved exactly like a regular type="text" input.
Re: Why the Gov.uk Design System team changed the input type for numbers
#94Earlier quoted context omitted.
That's one of the reasons I love Stripe's checkout being used everywhere and designers elsewhere basically copying them. The internet is constantly getting better and I don't think we give that progress we've made in web design over the last few decades enough credit. Just imagine how bad it used to be to just purchase a simple thing on an ecommerce site in the mid 2000s. Or remember what car websites used to look li…
> Or remember what car websites used to look like vs what they look like now. lingscars.com ?
Side note: anyone remember "I knows me some ugly myspace" from Ze Frank?
Re: Why the Gov.uk Design System team changed the input type for numbers
#95Earlier quoted context omitted.
That's one of the reasons I love Stripe's checkout being used everywhere and designers elsewhere basically copying them. The internet is constantly getting better and I don't think we give that progress we've made in web design over the last few decades enough credit. Just imagine how bad it used to be to just purchase a simple thing on an ecommerce site in the mid 2000s. Or remember what car websites used to look li…
> Or remember what car websites used to look like vs what they look like now. lingscars.com ?
Re: Why the Gov.uk Design System team changed the input type for numbers
#96Earlier quoted context omitted.
This may not be semantically pure, but I think type="tel" is a simple and ergonomic approach to credit card input. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/in... EDIT: Also more widely supported than https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...
I'm not against weird hacks where necessary, but how is this better than the GP's non-hacky suggestion? Inputmode isn't supported by most desktop browsers but it doesn't need to be. Every mobile browser save mobile Firefox supports it. ...I wonder what's up with Mobile Firefox?
Re: Why the Gov.uk Design System team changed the input type for numbers
#97Earlier quoted context omitted.
I hate it when they have drop-down menu for entering your year of birth, so the older you are, the further you have to scroll, but only infants and toddlers can select the year they were born without scrolling. A non-numeric text field is so much easier, and you should also be able enter your birth year as Roman numerals (which is even easier for millennials).
I think you're joking about Roman numerals, but millennials birth years are anything but easy to type in as a Roman numeral. For example, my birth year of 1987 is MCMLXXXVII.
Re: Why the Gov.uk Design System team changed the input type for numbers
#98In summary the main issue is that, according to the spec, ` ` is only for numbers that are going to be parsed into a Javascript number. It has to make sense to increment, decrement or do other numerical operations on it. It's not to be used for strings or identifiers that just so happen to be numbers, e.g. credit card numbers. I'll admit this is slightly surprising to me but it does make a certain amount of sense. Th…
To put it more succinctly and without unnecessarily referring to JavaScript semantics, type="number" is for quantities , not mere strings of digits . It's an unfortunate accident of the English language that both are commonly called ‘numbers’. We might not have had this confusion if some other language were the lingua franca of computing.
Interestingly enough, I can confirm as a native speaker of one such language (🇸🇮Slovene), that outside of discrete mathematics and tech, the words are often used interchangeably. This suggest that the lack of a word in English isn't the cause but the effect. The distinction was likely not necessary before the modern era, so old (==all) languages never created/adopted proper terminology.
Re: Why the Gov.uk Design System team changed the input type for numbers
#99The real problem is that there is no type for other "numeric" cases.
Re: Why the Gov.uk Design System team changed the input type for numbers
#100Earlier quoted context omitted.
That's one of the reasons I love Stripe's checkout being used everywhere and designers elsewhere basically copying them. The internet is constantly getting better and I don't think we give that progress we've made in web design over the last few decades enough credit. Just imagine how bad it used to be to just purchase a simple thing on an ecommerce site in the mid 2000s. Or remember what car websites used to look li…
> Or remember what car websites used to look like vs what they look like now. lingscars.com ?
That's some real artisanal HTML right there. <3