News for hackers. Stuff that matters.
Re:Why the Gov.uk Design System team changed the input type ... by Wowfunhappy on Thursday February 27, 2020 @05:11PM (#22438501)
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 ... by brlewis on Thursday February 27, 2020 @05:36PM (#22438713)
Using the same markup for desktop and mobile means less code which usually translates to fewer bugs.
Re:Why the Gov.uk Design System team changed the input type ... by Wowfunhappy on Thursday February 27, 2020 @06:34PM (#22439118)
It would be the same markup. It just wouldn't do anything on desktop. Which is fine because desktops generally have physical keyboards.

I apologize if you already know this, but to make sure we're on the same page: what "inputmode" does is tell phones to display the onscreen keyboard as a numpad, instead of a full set of QWERTY letters and numbers. Outside of a few edge-cases, you don't generally need that on desktop.

Re:Why the Gov.uk Design System team changed the input type ... by brlewis on Thursday February 27, 2020 @11:25PM (#22440509)
TBH I went on autopilot looking at MDN's browser compatibility list. Also as a user of Firefox on Android I was interested in something that works there, but type="tel" doesn't behave any better. The only advantage to not using inputmode is getting rid of an HTML validator warning, so you're right.