Friday, June 22, 2007

HTML required fields

In HTML5, it defines "required" attribute for the required fields. The example is

<ul>

<li><label> Name: <input type="text" name="name" required="required" /></label></li>

<li><label> Comment: <input type="text" name="comment"
/></label></li>

</ul>



In the W3C WCG20, SCR25: Using Dynamic Web Content Accessibility to programmatically identify form fields as required, it also mentions "required" attribute for required fields. But, in that script sample, it shows

setAttrNS(field, "required", "true");

And, screen reader should be able to read out.



Both above sites use the same attribute "required". My question is here :

Can screen reader still read out if required="required"?



I incline to HTML5 since it's much clean and easy in the design.

8 comments:

Anonymous said...

Thanks for pointing this out. Traditional HTML is nothing but a jumble through a screen reader.

wow power leveling said...
This comment has been removed by a blog administrator.
Anonymous said...

i erally like this post... thanks

OnlinePharmacynoPrescription said...
This comment has been removed by a blog administrator.
viagra generic said...

ahh..really a great one man.i am going to bookmaek this page.

generic drugs said...

Thanks, helpful source.

Side effects of steroids said...

Why don't you look for the answer at forums?

generic viagra for men said...

Thanks a lot for providing this
code.





.....ALex