WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Form error messages (asp.net 4)

for

From: Angela French
Date: May 2, 2013 6:07PM


>Inserting errors into the connected label is the bullet-proof method that would
>work on any user agents with no aria support.
>
>
>
>Paul J. Adam
>Accessibility Evangelist
>www.deque.com
>
>

Thanks Paul.
I'm curious - I know that the html spec allows for two labels for an input tag. How do screen readers handle two labels associated with one element? Assuming my html coding is correct (I've never done two labels with one input), how would my example be heard?

<label for="firstname">First Name:</label><input type="text" id="firstname" /><label for="firstname">You forgot to enter your first name</label>

Angela French