WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Form error messages (asp.net 4)

for

From: Bryan Garaventa
Date: May 2, 2013 7:47PM


If it helps, there is an inline form field validation and dynamic help
tooltip demo at
http://whatsock.com/modules/form_validator_module/demo.htm
Which has been tested successfully using JAWS 12, 13, and 14 in IE 8 and 9
and Firefox, NVDA in IE and Firefox, and using Voiceover in iOS Safari.

----- Original Message -----
From: "Paul J. Adam" < <EMAIL REMOVED> >
To: "WebAIM Discussion List" < <EMAIL REMOVED> >
Sent: Thursday, May 02, 2013 4:59 PM
Subject: Re: [WebAIM] Form error messages (asp.net 4)


> If you're coding the asp.net forms by hand or at least tweaking the code
> by hand then any ARIA attributes would be possible. I understand the
> default drag and drop controls are not usually accessible.
>
> If you're still limited to not using aria-describedby to programmatically
> associate the error messages with the invalid inputs then inserting them
> into the connected label would be your only other option to associate
> errors to inputs.
>
> Inserting errors into the connected label is the bullet-proof method that
> would work on any user agents with no aria support.
>
> My recommended approach is to send focus to the first invalid input after
> a bad form submit. If the error is associated with the input then the user
> will hear it.
>
> For form validation I also recommend the use of HTML5 required an/or
> aria-required. I also recommend the jQuery Validation plugin with some
> tweaks to how it inserts the error messages.
>
> I've given this presentation a number of times and will be doing it at
> AccessU as well, HTML5 & WAI-ARIA Forms with jQuery Validation,
> http://pauljadam.com/forma11y/.
>
> Hope this helps :)
>
> Paul J. Adam
> Accessibility Evangelist
> www.deque.com
>
> On May 2, 2013, at 6:44 PM, Angela French < <EMAIL REMOVED> > wrote:
>
>> We are having a discussion where I work about different ways to implement
>> the display of form validation error messages so that they are
>> accessible. We develop with asp.net 4 using Visual Studio 2010, which,
>> if I understand correctly has limited support ARIA so that aria-described
>> by or aria-alerts wouldn't be an option.
>>
>> What is the most bomb-proof, most widely support means of displaying
>> error messages that can be perceived by screen readers when in forms mode
>> that we could implement given our environment? I'm assuming that only
>> putting errors in the <label> tag or by using ARIA would meet this
>> criteria, but am eager for other ideas we may not have thought of.
>>
>> As always, I appreciate your input.
>>
>> Angela French
>> Internet Specialist
>> State Board for Community and Technical Colleges
>> 360-704-4316
>> <EMAIL REMOVED> <mailto: <EMAIL REMOVED> >
>> http://www.checkoutacollege.com/
>>
>> >> >> >
> > >