News for hackers. Stuff that matters.
Re:Why the Gov.uk Design System team changed the input type ... by pwdisswordfish2 on Thursday February 27, 2020 @01:17PM (#22436030)
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.

Re:Why the Gov.uk Design System team changed the input type ... by bobthepanda on Thursday February 27, 2020 @02:38PM (#22436929)
I mean, this could've been solved by the spec using type="quantity".

Many languages have generic, ambiguous umbrella terms, it's the sloppiness of the spec picking one.

Re:Why the Gov.uk Design System team changed the input type ... by alexis_fr on Friday February 28, 2020 @01:59AM (#22441040)
A sequence of numbers could be called, with a little approximation, a barcode. Which makes me wonder why credit cards don’t have an actual barcode to easily enter it on the computer.
Re:Why the Gov.uk Design System team changed the input type ... by franga2000 on Thursday February 27, 2020 @06:01PM (#22438914)
> 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 ... by samatman on Thursday February 27, 2020 @02:37PM (#22436918)
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.

Re:Why the Gov.uk Design System team changed the input type ... by mjevans on Thursday February 27, 2020 @05:13PM (#22438521)
float, floating, double, etc would have been better choices for that type...

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 ... by pfranz on Thursday February 27, 2020 @05:07PM (#22438472)
Technically, number (a quantity) vs numbers (a series of numbers) would suffice. "Numeric" (as an input mode vs a number type) makes sense, too.

I think it's just an evolution of our education, preferred input devices, and specs all catching up with each other. On a desktop I just start typing numbers from the keyboard. On a smartphone I click on a credit card field, if the field expects "text" I have to click "123" then input the number using a number row with smaller target sizes. I would greatly prefer to directly show me a number pad.

Re:Why the Gov.uk Design System team changed the input type ... by jsjohnst on Thursday February 27, 2020 @02:40PM (#22436951)
The spec could’ve used type=“quantity” and there wouldn’t be as much or any confusion.

Point being, blaming the language used for writing the spec, when you readily offered up a better alternative, feels misguided to me.