5 ms·
Ctr+F "javascript" -- no results. Hmm, if a government website necessitates the use of JavaScript, I'd consider that a hallmark of being awful.
by davisr 2y ago
Ctr+F "javascript" -- no results. Hmm, if a government website necessitates the use of JavaScript, I'd consider that a hallmark of being awful.
- mierz00 2y agoI’m not sure if this is a joke but if not.. 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.
- huygens6363 2y agoBroad range of users means keeping it simple and sticking to the standards. 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.
- azornathogron 2y agogov.uk recommends having a single question per page - principally to make the form easier for users, but it also means you can handle progress saving and conditional sections and so on server-side. https://www.gov.uk/service-manual/design/form-structure https://www.gov.uk/service-manual/design/form-structure
- IshKebab 2y agogov.uk is pretty good, and their forms are quite good. But there are definitely still places where this design is worse than one using JavaScript. 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!
- petepete 2y ago> 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. 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.
- g15jv2dp 2y ago> There's so much research that shows the opposite. Care to link it? It should be easy to do, if there's so much of it.
- IshKebab 2y ago> At which point do you announce the mistake to a screen reader? There is a standard for this: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid 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??
- petepete 2y ago> There's research that shows that a "tomorrow" button is bad?? That client side validation isn't always accessible. More info here: https://design-system.service.gov.uk/patterns/validation/ https://design-system.service.gov.uk/patterns/validation/
- IshKebab 2y agoThat page doesn't say that at all. In fact they even mention a character count component that gives instant feedback.
- petepete 2y agoI do, thanks. https://design-system.service.gov.uk/ 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)
- ozr 2y agoIt's 2024. We've got to stop with the not everyone has javascript meme. Anyone browsing the internet without it at this point is doing it intentionally to be special.
- flir 2y agoI've moved to "transient network faults" as my defence against creeping JS. What if the HTML gets to the user, then their mobile connection drops? The page should at least look vaguely sane. (I think I got it off a BOFH excuse calendar.)
- coretx 2y agoIt's 2024. We've got to stop making everything turing complete.
- wizzwizz4 2y agohttps://www.gov.uk/service-manual/technology/using-progressive-enhancement https://www.gov.uk/service-manual/technology/using-progressi... > You should not assume the reason for designing a service that works without CSS or JavaScript is because a user chooses to switch these off. > There are many situations when extra layers can fail to load or are filtered, for example: https://technology.blog.gov.uk/2016/09/19/why-we-use-progressive-enhancement-to-build-gov-uk/ https://technology.blog.gov.uk/2016/09/19/why-we-use-progres... > It’s important to understand that it’s often not the conscious choice of users to arrive at your site without JavaScript. We did some research and discovered that 0.9% GOV.UK visits are by people who don’t have JavaScript available and haven’t chosen to turn it off.
- devjab 2y agoI worked in the public sector of Denmark for years and you’re going to have some real issues handling authorisation of users from external sources such as our digital identity called mitID without JavaScript. Some forms and many parts of a government website can indeed be done without JS and should at the very least be done with server side rendering to minimise the usage of JS as much as possible. But large parts of a “modern” government website will typically require some JS in order to operate properly.
- bruce511 2y agoI would somewhat strongly disagree . Using JavaScript allows for a more interactive interface, where cause and effect are more clearly visible, and where the relationship between answers and further questions is more obvious. For example, it's common for govt forms to have sections like "fill this part in if you're a resident" and "fill this part in if you're a visitor". Elsewhere in this thread, auto-saving is mentioned, trivial to do with javascript, (and more privacy respecting to do if using local storage.) The alternative is "one page per question" - which is the slowest way possible to fill out a form (and not inconsequentially puts the highest load on the server.) JavaScript is part of the web, and offers significant UI and work-flow advantages. Govt (or indeed any site) that eschews it is unnecessarily degrading the experience for the vast majority because some sliver of the audience don't like it.
- ndriscoll 2y agoIt allows for more interactive forms, but also frequently makes cause/effect confusing. e.g. things like autofill or tabbing or sometimes just typing quickly can cause forms to break because they think you have not filled out a field, and it's doing something stupid to make it so you can't fill out the next field, so you end up having to delete and retype text to get it to pick it up.