Governments often have complicated forms that need to cater for a broad range of users. So you need things like conditioning steps, file uploads and progress saving.
Have fun doing that in pure HTML and CSS.
Governments often have complicated forms that need to cater for a broad range of users. So you need things like conditioning steps, file uploads and progress saving.
Have fun doing that in pure HTML and CSS.
The complexity of government forms is not about fancy custom dialogs, elaborate data types or cute animations. There are usually a lot of (simple) questions. Yes/no, checkboxes, dates and times, free fields. The list is not endless.
These forms needs to be frustration free as possible. IME all easy targets if you don’t use JS.
For example when paying for tax free childcare you have to enter a date for when you want the payment to go out. Not only is the date picker just three edit boxes (no "tomorrow" button for example), but it isn't validated at all so if you put in today's date (quite reasonable) and click next it will only tell you on the next page that you can't use today.
It would be much better if a tiny bit of JavaScript told you as soon as you put the date in, and if it had a "tomorrow" button, which would also require some JavaScript.
JavaScript was invented for a reason!
There's so much research that shows the opposite.
You might prefer that but government websites need to work for everyone, and showing validation messages automatically confuses less technically able people, and it's really hard to make it fully accessible.
At which point do you announce the mistake to a screen reader? Where do you shift focus? etc.
It was designed this way for a specific reason. Services that feel the need to extend or change it do have the option to though.
There is a standard for this: https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...
But I would suggest just having the validation in addition to the current behaviour.
> Where do you shift focus?
You don't?
> There's so much research that shows the opposite.
There's research that shows that a "tomorrow" button is bad??
That client side validation isn't always accessible.
More info here:
> When to tell the user about validation errors
> Do not validate when the user moves away from a field. Wait until they try to move to the next part of the service - usually by clicking the ‘continue’ or ‘submit’ button at the bottom of the page.
Yeah the character count is a bit of a special case because reaching the limit without going over would be very inconvenient.
Care to link it? It should be easy to do, if there's so much of it.
https://design-system.service.gov.uk/
(I'm aware the design system has a sprinkling of JS, but it offers a few in-page enhancements and works just fine without)