简体   繁体   中英

How to make server side form validation compatible with screen reader

if screen reader fill any content wrong then how to give info (if javascript is disabled) to user to go that field any fill the correct value.

with JavasSript we can show javascript alert but if JavaScript is disabled then?

I need a solution for both ASP.NET 2.0 and PHP.

There are two main things you should do:

Make it clear there was a problem by displaying an information message at the top of the page.

Place error messages inside label elements so they will be read in Forms mode. Make sure you have only one label element per input (some screen readers can't cope with multiple labels).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM