We should all be writing valid code. So when we talk about breaking the rules we’re not talking about throwing out all the rules here - we`re specifically talking about ARIA. ARIA adds programmatic accessibility where it just didn`t exist before. It allows us to programmatically specify what an interface component is beyond the collection of markup and CSS that it is comprised of. We can say “This is a slider” or “this is a tree” or this is a set of tabs (even though each them might be just a collection of and elements). If you want more of a primer on ARIA, I wrote a brief primer in my article on A List Apart: ARIA and Progressive Enhancement.
Now then, you can add ARIA to HTML5 and you can even validate with some of the newer validation services. validator.nu and even the w3c’s validator have support for validation for HTML5 + ARIA (just remember, HTML5 and ARIA still aren’t completely specified and implemented yet, so there are quite likely some issues that may crop up when you’re validating).
But what if you’re not using HTML5 and your web app is HTML 4.01? or XHTML 1.0? Then what?
You can switch your DOCTYPE to HTML5 so that your app/documents are recognized as such, and would therefore allow ARIA’s role and other attributes to be valid.
Or—and this is where I get a bit crazy—you can just leave your DOCTYPE alone. Leave it as HTML 4.01. Leave it as XHTML 1.0. Add ARIA anyway. Break the rules. |