Latest Entries
-
March 1st 2010
-
February 6th 2010
-
October 30th 2009
-
September 25th 2009
-
August 12th 2009
One thing I love about W3C validator, for both HTML and CSS, is the keen ability to check incoming referrals, and validate against those pages. This makes creating and maintaining valid code a lot easier than if you had to manually type in every URL or hard-code the links into your pages.
This is something I have long felt was lacking from services such as the automated accessibility checker Cynthia Says. Usually, the best that we can do is have a 508 link which checks the root of our domain. This is all well and good, except that problems tend to creep up on interior pages more often than a home page. It’s easy to neglect the rest of a site.
Luckily, using some of the tag logic provided by Textpattern, we can create self-referential 508 links, so that each and every page on a site can easily be checked for accessibility compliance. Here is an example of the TXP code.
Template logic:
<a href="http://contentquality.com/mynewtester/cynthia.exe?Url1=http://example.com<txp:page_url />">508</a>
HTML output:
<a href="http://contentquality.com/mynewtester/cynthia.exe?Url1=http://example.com/">508</a><!-- or --><a href="http://contentquality.com/mynewtester/cynthia.exe?Url1=http://example.com/section/article-title">508</a>
Presupposing that your site is set up to follow /section/article-title URL structures, the above code will output a self-checking 508 link for the URL: http://example.com/section/ – except for when on the root of the site, in which case no section name is output.
Likewise, if the user is viewing an individual article, a 508 link to that particular page is provided. With those two angles covered, you’ve pretty much guaranteed that every page on your site will always be check-able, hopefully leading to more accessible code overall. Happy validating!
icons via Komodo Media
The thoughts and opinions expressed here are mine alone, and are not necessarily shared by any other living person.