And shouldn't they be doing this anyway?
And shouldn't they be doing this anyway?
Server side sanitisation doesn’t address any of the accessibility concerns. Server side sanitisation doesn’t address the silent dropping of characters concern. Server side sanitisation doesn’t address the incrementing/decrementing the value accidentally concern.
That’s because the issues being discussed here are about creating a good UI that minimizes errors, and has little to do with sanitisation.
All I'm saying, they could've used text all this time, and never had all these problems to begin with, with the slight exception of a slightly-clunkier UI.
Well, now they're text anyways, so, yeah.
EDIT: If JS was an option, they could've also used text and then use "<form onsubmit=SanitizeInput()>".
They want to give their users a numeric keyboard but without the downsides of a numeric textfield. Your solution seems oblivious to their goals and TFA.
I think I'm just not chill enough for that.
Given the choice of bad UI vs. (accidentally) modified data, I'd pick bad UI any day.
Insistence on using number makes me suspect they require sanitation to be done client-side.
EDIT: Normally, I wouldn't assume a website run by a government wouldn't be doing this, but wasn't there some scandal recently in the US about the Dems and some web-app, and that it was woefully amateuristic? Suffice to say, that has kinda changed my perception about governments and IT. Then again, "gov.uk" has a tech blog, so I'm probably misplacing my skepticism.
EDIT2: Updated tense.
Why when they explicitly state that it was done for getting the proper input UX on mobile? The whole article is about finding a good UX for inputting numbers, taking different device types and accessibility concerns into account. It doesn't mention using these for validation at all afaict. Somewhere in this thread one of devs showed up and explicitly stated that they disable all HTML validation on the pages.