Jump to content

Accessibility question, validation errors


Recommended Posts

I'm wondering the best way to handle validation messages for blind people, or sight-impaired.


In my application, the situation on a save with errors is:

  1. User clicks save
  2. AJAX call goes to save the record; wait bar appears on the page's status bar
  3. Error is returned. The wait bar changes to show "Error on save"
  4. Below the status bar, each field name is listed with the appropriate error message. ("Name - Cannot be blank" or whatever)
  5. Within the fields themselves, the same message is shown again. (Next to the "Name" label on the page, "cannot be blank" would show up.)

This functionality is great for sighted people. But for non-sighted, I'm not sure exactly how to handle it. Should an error become "selected" or something? I mean, it's just a div. I don't really have the answer.


I posted this in general HTML but it could frankly be AJAX or JS or something. I think HTML is probably the most correct.

Link to comment
Share on other sites

I don't have any direct experience in this area, so I can't really comment on what works or doesn't work. There are some guidelines about creating accessible documents you could check into for suggestions.


What I would suggest is that you get some of the commonly used screen reading software and simply try various methods to see how well they work. Trying various software would best let you figure out how it handles things like dynamically added content.


At minimum you should probably set focus to the first field which has an error by calling it's .focus() method. I would guess that should trigger the label for that field to be read again along with any text you may have added.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.