views:

28

answers:

2

I'm looking for a easy to use jQuery form validation plugin, which give validation error as a "Alert". Because alert is the best way to inform screen reader users about errors.

alt text

+2  A: 

You can modify the jQuery validation plugin.

$('form').validate({
              errorPlacement: function(error, element) {                
                 alert(error.text());
               }
          }); 

Hosted by Microsoft.

alert() may be useful for screen readers (citation?) but they are frustrating for everyone else. Anyone else agree?

alex
I think alert is the best way to inform about error to disabled users and it's also easy for people who like to use keyboard.
metal-gear-solid
@metal-gear-solid It is also useful for people who like having their browsing experience stolen by an `alert()` :P
alex
A: 

Most of the validations plugins write out a summary of the issues onto the page. You could do a simple code change in the plugin to just do an alert() versus jquery writing it using .html()

Shouldn't be too painful of a mod, and something small to have some fun modifying a plugin.

Ryan Doom