WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Form validation on blur or on form submission

for

From: Steve Green
Date: Jun 6, 2018 4:08PM


This is precisely my thought too. Historically (say up to perhaps ten years ago) validation was just about always done on form submission and I don't recall any users expressing dissatisfaction with this. It seems that new approaches such as validation on blur and even validation on key-up have become common without any user research that I am aware of.

We have a client whose existing website has a mixture of all three approaches and we have to decide which one to standardise on, so I would be delighted to find that they have been researched extensively and one approach was found to be better.

Steve


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of JR Accessibility
Sent: 06 June 2018 19:33
To: <EMAIL REMOVED>
Subject: Re: [WebAIM] Form validation on blur or on form submission

While errors being returned after post-back can be frustrating, the argument in favor of errors on post-back that I have from an accessibility consultant is as follows.

(Begin quote.)

The errors can fire immediately on tab-out for a sighted user, but for a non-sighted user, I believe it is better to catch the errors at the end (on form submit).

The reason why is because when the user tabs out of the field, if an error is announced (by screen readers), it often interferes with the new field label being read that was just tabbed into.

Also, when the user tries to submit, it is a natural time to hear errors, and at that time we can programmatically place their focus on the field that has the error, making it easier for them to fix it than if they had just tabbed out, then have to tab back into the problem field.

(End quote.)

I do agree that user research around this topic would be beneficial.

-----

From: "Swift, Daniel P." < <EMAIL REMOVED> >
To: WebAIM Discussion List < <EMAIL REMOVED> >
Date: Wed, 6 Jun 2018 13:04:53 +0000
Subject: Re: [WebAIM] Form validation on blur or on form submission
Steve:

A number of years ago we did some research on forms. In general, the shorter the forms, the better. I believe that we discovered that label on top of field was better, but we still use them next to each other to lessen the scrolling. On mobile and magnification, this changes to a single column of labels and fields.

We also do on-blur validation with validation occurring server-side in case JS is disabled and for sanitation. Even though I'm a technical person, I can speak on a non-technical level -- I've filled out many forms and find it incredibly frustration when an error is returned after post-back. The site owner gets extra fist-shaking if they've also cleared out part of the form as that invariably leads to a second submission complete with a second error.

Hope that helps!

Dan Swift
Senior Web Specialist
Enterprise Services
West Chester University
610.738.0589