News for hackers. Stuff that matters.
Re:Why the Gov.uk Design System team changed the input type ... by shakna on Thursday February 27, 2020 @11:59AM (#22435075)
> 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 like it might be leaping the gun on expecting this standard to pick up the slack.

Whilst they might feel the support is there for their particular audience after 2019, I wouldn't, and would suggest that you need to check your particular audience closely before following this advice for your own site. (Which is fairly generic advice, but appropriate.)

[0] https://caniuse.com/#feat=input-inputmode

Re:Why the Gov.uk Design System team changed the input type ... by joelanman on Thursday February 27, 2020 @12:12PM (#22435245)
The article covers quite a few issues with type=number, including some pretty bad accessibility ones. On balance I think even if inputmode doesn't have 100% support, those users will simply get a normal keyboard, which isn't so bad. Disclaimer - I work on the team.
Re:Why the Gov.uk Design System team changed the input type ... by vidarh on Thursday February 27, 2020 @12:34PM (#22435526)
Yeah, for my current work app we've just unceremoniously dropped type=number for most things, without inputmode or anything, and the experience is overall so much better even then.
Re:Why the Gov.uk Design System team changed the input type ... by samatman on Thursday February 27, 2020 @02:41PM (#22436965)
I wish you'd use inputmode.

I find it vaguely unsatisfying when I'm asked to input a pure string of digits using a full keyboard on mobile. It feels half-baked, and my estimation of the quality of the software goes down.

Re:Why the Gov.uk Design System team changed the input type ... by signalsmith on Thursday February 27, 2020 @12:16PM (#22435302)
In this case, the fallback is still a plain-text field, into which the user should enter numbers. Perfectly usable, but without the keyboard hint, so it seems like a graceful fallback to me.
Re:Why the Gov.uk Design System team changed the input type ... by SifJar on Thursday February 27, 2020 @12:23PM (#22435394)
> Desktop support is also extremely spotty.

Arguably it's less important there if one of the main motivations is that on mobile browsers will display a numeric keypad instead of full keyboard (which is my impression from skimming the article)

Re:Why the Gov.uk Design System team changed the input type ... by chrisweekly on Thursday February 27, 2020 @01:04PM (#22435860)
Desktop support is also almost moot, though, right? What's the "desktop with virtual keyboard" use case?
Re:Why the Gov.uk Design System team changed the input type ... by oldmanhorton on Thursday February 27, 2020 @01:42PM (#22436319)
Touchscreen pcs? Surface Pro users in particular would see this.
Re:Why the Gov.uk Design System team changed the input type ... by alkonaut on Thursday February 27, 2020 @05:13PM (#22438519)
The fallback is a regular touch keyboard with both letters and digits. On a screen larger than a phone I think I’d prefer that to a numeric pad.
Re:Why the Gov.uk Design System team changed the input type ... by daveoc64 on Friday February 28, 2020 @07:35AM (#22442334)
Yes. The lack of support for this in Firefox for Android makes using many forms disappointing.

Interestingly I see that https://vehicletax.service.gov.uk/ uses type="tel", so I am getting a numeric keyboard in Firefox.

Re:Why the Gov.uk Design System team changed the input type ... by chias on Thursday February 27, 2020 @02:05PM (#22436605)
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 ... by alkonaut on Thursday February 27, 2020 @05:14PM (#22438528)
The pattern is only a trick to persuade old iOS Safari to show the numeric pad even though it’s “text”.
Re:Why the Gov.uk Design System team changed the input type ... by emayljames on Thursday February 27, 2020 @01:40PM (#22436291)
There needs to be a website to see if you can use caniuse website on your mobile browser. The site is unusable on mobile Firefox. The irony.
Re:Why the Gov.uk Design System team changed the input type ... by opless on Thursday February 27, 2020 @12:26PM (#22435431)
As long as they validate their inputs!