WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Form validation on blur or on form submission

for

From: JR Accessibility
Date: Jun 6, 2018 12:33PM


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