WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA and Label tags both for Error Messages


From: Alastair Campbell
Date: Feb 17, 2014 5:23AM

Sorry to jump in the middle a old thread, but I did some testing on this

Susan Grossman wrote:
"We have gotten some push back from a federal agency saying that no ARIA is
supported well enough to rely on and that we must you both aria and label
tags to associate the error messages."

I was working with a team that struggled with implementing my suggestion:
putting error messages in the label. Unfortunately they couldn't match the
visual design, at least in a responsive layout.

They tried multiple labels (which I thought odd, but couldn't find anything
that forbade it), but that didn't work very well in NVDA.

Then we tried aria-describedby, but found that VoiceOver on OSX doesn't
support describedby, test-case:

As a temporary fix I think they used aria-labelled by, which consistently
appends the error message to the primary label. However, describedby would
seem the better fit in general.

Jukka wrote:
> "The aria-describedby attribute is supposed to provide information about
a field, not about an error condition."

So what should associate an error message? The issue is that a screen
reader user tabbing through the form fields cannot tell which have an error
unless the message is associated with the input. E.g. in the label, or
using an ARIA association.