Live data from Hacker News

HTML Form Validation is underused

expressionstatement.com

311–320 of 343 posts

Re: HTML Form Validation is underused

#311
post #202

Earlier quoted context omitted.

> usability is more important than branding. Said no designer ever. At work our design team came up with buttons that are 10x10 pixels on my screen. They are used to change pages (like on mobile, but this is a desktop program), the scroll events are ignored by design, so you either click the tiny buttons (which are slightly darker gray than the dark background) or you simulate a finger swipe via drag and drop with th…

>usability is more important than branding. Any designer unwilling to say this, especially in the context of accessibility, should be outright fired. They are bad at their job. Accessibility is a legally mandated requirement , not an afterthought

As a disabled person: "and yet"…

The place where I live is very good at pretending to do the right thing while doing absolutely nothing.

For example a touristic social account managed by some government entity posted some extra complicated wheelchair lift (that will inevitably break in 1 month at most) to show how disabled people are well integrated.

Meanwhile of course the real situation is that people on wheelchair can go almost nowhere at all. Newer public transport has even worse accessibility than before, elevators are mostly broken at all times and regular ramps are missing, doors regularly have super strong springs and a button to open them (which breaks all the time) when they should just have a much weaker spring instead.

Designers I've worked with are like the tourist social media account. Showing the one single place they made accessible and explicitly saying in meetings "we are good people, we care for disabled people"… and then hating me for pointing out the million other things that are not accessible.

Re: HTML Form Validation is underused

#312
post #274

Earlier quoted context omitted.

this seems like a very mean spirited take on accessibility?

I took from it that [the designers] are all mouth and no trousers – which is fairly common. But "the poor disabled people" seems patronising.

Yes very patronising, a terrible attitude really. Which is why I criticise it.

Also I'm disabled myself, although not in a way that requires any adaptation to use a computer. But I of course notice these things a bit more than average; and I get to hear my elderly father's complaints about software that he can't use because of inaccessible design.

Of course a designer should be qualified and notice these things even more… but all they do is move buttons around and disable copy paste so that even fully abled people have a hard time using our software between versions.

Re: HTML Form Validation is underused

#313

After reading all this, I think I'd still choose to do it away from the browser built in capabilities. I'd rather have full control over the process and the design than rely on the limited capabilities of browsers. The browser is programmable; at this point they should stop getting clever about adding built-in functionality and instead just expose better ways to use the browser as a dumb UI toolkit.

Strongly disagree. There are so many places where the browser itself provides a reasonably good user interface, and web developers fuck it up - scroll hijacking and history manipulation being two of the biggest examples. I suspect that one of the reasons we ended up in JS-hell is that HTML and browser built-in functionality lagged behind user expectations for so long. If browsers had offered the equivalent of AJAX an…

The browser only reluctantly accepts its role is an application UI platform. Every problem, including the ones you describe, come from the disconnect between what a browser is and what it is used for. The browser is always going to lag behind user expectations so that's why I think it's the last place we should put that functionality.

Adding more high-level UI functionality is really in conflict with the idea of browser as platform. Other features, like WASM, are pushing the browser the other way.

Re: HTML Form Validation is underused

#314
post #250

Earlier quoted context omitted.

That the browser implementations are generally terrible and wouldn't pass accessibility audits, so all browsers would have to change and then some time to pass for the fixed versions to be widespread. We didn't discuss browser-specific issues in detail, but I edited some points in my original message that highlight some of the issues that I suspect make it a no-go for accessibility.

Seems to me that this says that the browsers have the accessibility problems and that's what should be fixed. Why does every website developer have to work around this while the browsers get a free pass? If field validation is "standard HTML" and browsers can't do it in an accessible way, that's squarely a browser problem.

> Why does every website developer have to work around this while the browsers get a free pass?

Because browser makers are merrily taking that free pass, whether we like it or not, and people who need accessibility allowances need them now, or better still quite some years ago, rather than at some future time after we've nagged the browsers into taking useful action.

It isn't entirely the browser people's fault, there are significant issues in the spec, as already discussed in these comments by people who know more about it than I, and that is part of why they feel justified in taking the free ride, but as some of them were involved in the original specs and they are in a position to propose alternatives & deliver PoC implementations, it is more their responsibility than they think. After all, Google in particular are more than willing & able to invent new specs¹ and throw implementations into production, when there might be marketshare, stalk^H^H^H^H^Hadvertising income, or protection money² on the line.

----

[1] and Apple deliberately break them, old or new, in a fit of pique!

[2] Nice app/extension you have there, it would be a shame if it started failing store inclusion reviews, or if APIs had breaking changes for our benefit underneath you.

Re: HTML Form Validation is underused

#315

Earlier quoted context omitted.

True. But you can hide the default message and replace it with your own. You'll still benefit from the form validation.

There is no real benefit because the validation rules allowed there are often too limited for real use-cases anyway.

Really? In my experience they easily cover the majority of cases - strings versus numbers, min and max length, upper and lower bounds to values, specifying what decimal level you’ll accept, you can even straight up provide a regex in the ‘pattern’ attribute.

Re: HTML Form Validation is underused

#316
post #128

Because it sucks. It does not translate with the application but with browsers settings, it doesn’t style or fit any design. It looks differently on different browsers and it is really hard to explain to stakeholders “this is from browser I don’t have control over it”.

And your application should be looking at ... the browser settings.

I could see a case, if a user decides to somehow make a single website use a different language than the others. I guess it would be a browser's job to have specific languages for specific websites.

Re: HTML Form Validation is underused

#317

Earlier quoted context omitted.

Because this often makes the input feel broken to the user. Instead of asserting that "users are too stupid" as you have done earlier, perhaps programmers should be less stupid and write more permissive parsers. Accessible design is actually pretty hard, and most designers and programmers get this wrong. If you want some good design advice, you can start here: https://adamsilver.io/blog/the-problem-with-live-validati…

I'm not using "stupid" in the derogatory sense. I'm using it as a recognition of the skill/knowledge gap between technical and non-technical users. To clarify, we get _asked_ by our users to implement fields that limit input to help them avoid mistakes. Our QA and UX teams agree. This isn't a unilateral engineering decision.

Yes, you want to provide guidance, but without getting in the way.

That's why I was suggesting letting the user paste in these 'wrong' characters, but offering help in removing them.

Of course, that's a trade-off. And it's more annoying to design and implement than just forbidding those characters from entering the input field in the first place.

Re: HTML Form Validation is underused

#318

Last time I checked, web-browsers today still do not allow you to style the appearance of built-in HTML validation messages [1]; this wouldn't be so bad if Chrome (and Firefox) still conformed to their OS platform UI guidelines (i.e. so it looks system-generated, like how `title=""` tooltips used to be), instead Chrome uses this ugly yellow/orange icon color with black-text on a white background on a bubble with a fi…

I think the problem here is not as much with the absence of custom styling, because you can quite easily read the native "validity" state of the input and render it however you want. The problem is that it's quite tricky to correctly subscribe to the changes of this validity state. There are indeed some validity events being dispatched, but unfortunately not always. Updating form state programmatically (such as calli…

I think form validation should remain an app implemented part of a web form, rather than natively built into the browser.

The majority of the work in form validation is not in the validation of the data, but in the UX and interaction, display and update of state. There's no generic way to handle it, as it's very dependent on the app itself.

Keeping the browser smaller and cleaner, with less logic seems to be a better idea.

Re: HTML Form Validation is underused

#319

Earlier quoted context omitted.

It's not the fact that software engineering is broken saddens me as much as the extent . Email is older than absolute majority of active developers and yet, it seems, simple knowledge like "what is email address" remains such an arcane knowledge that you are being looked at weird when present something a tiny little bit more correct than the status quo. Where else can we assume that the common knowledge is flat out w…

>"what is email address" Anything you can send an email to that is received, as far as I am concerned. I have my own domain, so why ahould I be forced to add an arbitrarily long string to it to be able to receive the mail? Or exclude @myDomain.com from being input on ? Or the worst of the worst: Disallow all but a few domains for emails. At this point, not validating it cient side at all is IMO the correct approach,…

> Anything you can send an email to that is received, as far as I am concerned.

100% this.

The only acceptable hard validation is to check whether there is an @ between some characters. something like `.@.` in regex.

It makes sense to do sanity checking (soft validation) on client side. There is 99.9% chance that `muppet@gmial.com` is wrong, outright rejecting that is wrong, though.

Re: HTML Form Validation is underused

#320

Earlier quoted context omitted.

Nah. Users are too stupid to fix their own inputs in many cases. Seen inputs with zero-width spaces that are invisible which fail validation. User doesn't understand why, complains. Enforcing a character set for certain kinds of inputs is a very good thing.

In 26 years of web dev, mostly as a frontend person, I've only seen zero width spaces in three situations - pasting from Word - QA testers being through - devs pranking each other The third one is by far the most common. Word is much better these days and I've not seen that happen in a long time. I wish I saw QA test this stuff more often. The idea that it's common enough that you'd break your UX to handle it bafflin…

Try copying any string from any e-mail.
Post reply on HN