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.
views:
28answers:
2
+2
A:
You can modify the jQuery validation plugin.
$('form').validate({
errorPlacement: function(error, element) {
alert(error.text());
}
});
alert()
may be useful for screen readers (citation?) but they are frustrating for everyone else. Anyone else agree?
alex
2010-10-22 03:06:49
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
2010-10-22 03:13:19
@metal-gear-solid It is also useful for people who like having their browsing experience stolen by an `alert()` :P
alex
2010-10-22 03:14:57
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
2010-10-22 03:06:52