WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Handling with accessible error messages.

for

From: Langum, Michael J
Date: Sep 23, 2010 6:36AM


The critical issue with form error messages, is helping the user get focus to the problematic input field. If you're error message simply reports a list of errors, and then sends the user to the first input field in the form, he/she will have to tab through all the forms until reaching the problematic one. If there were only ONE error reported (instead of a list) you could use JavaScript to send focus directly to the problematic input field.

If I were doing this, I would report errors one-at-a-time. Each error report would give correction instructions and direct the focus back to the problematic input. Where possible, I would also trigger this error report using the onBlur() event so that errors were corrected immediately.

-- Mike