WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA and Label tags both for Error Messages

for

From: Susan Grossman
Date: Feb 11, 2014 4:15PM


On Tue, Feb 11, 2014 at 2:34 PM, Hewitt,Susan (DSHS) <
<EMAIL REMOVED> > wrote:

> Do you mean you would include the error information within the label tag?
> (Obviously you wouldn't to drop them completely.)
>


It's returning with an error state and we would:
1) append the error message to the label text in the existing label
tag since the specification states one label to one form element
2) prepend an on-screen icon with alt text as error conditioner
identifier
3) probably make the text red
4) They also want ARIA, though it looks like a consensus that we
should push back on having both


>
> I agree with Yucca that this doesn't seem very semantic although I think
> the case could be made that it's not forbidden. W3C spec says: "The LABEL
> element may be used to attach information to controls." I think that gives
> license to include error information within <label> (after all, it's
> commonly used to provide formatting info and required status after all.) I
> also don't think it's inappropriate to use aria-describedby in this
> situation. But I would not use both methods.
>
>