开发者

How to make indication of mandatory fields and form's validation accessible for screen reader users?

开发者 https://www.devze.com 2022-12-18 09:39 出处:网络
When error message will come on validation if use have done something wrong then that error should be read by screen reader?

When error message will come on validation if use have done something wrong then that error should be read by screen reader? Any Screen开发者_如何学运维 reader compatible, accessible, unobtrusive jquery form validation plugin?

and how user will know which form field is mandatory?

my question is not about to make form with fieldset, legend, and label?


You can use the standard jQuery validation plugin and write your own validate() which collects the errors on submit and displays them in an alert(), rather than relying on showing and hiding divs/spans. alert() is considered to be screen reader compatible according to WebAIM.

http://docs.jquery.com/Plugins/Validation


Go with using the alert function to display errors. Standard practice appears to be putting a * by any required labels of required form fields.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号