WebAIM - Web Accessibility In Mind

E-mail List Archives

Best use of ARIA for form error validation messages

for

From: Chris Pearce
Date: May 5, 2013 7:56PM


Hi,

For *inline* form error messages i.e. errors that appear as the user is
interacting with the form inputs as opposed to errors appearing on form
submission whether it be via onblur, onkeyup JS events is the correct ARIA
to use on the error msg (a p element): role="alert"? And any thoughts on
how best to handle what to do when the input has been corrected e.g. just
remove the error from the source?

And for the opposite of the above i.e. errors all appearing at once after
form submission is the correct ARIA to use on the *input *element that
fails validation: aria-describedby="id-of-the-error-msg"? And make sure
focus is set to the 1st input that fails validation?

All errors msg's appear directly underneath their corresponding inputs.

Any input from screen reader uses will be greatly appreciated.

Cheers,
Chris