Textpattern 508 links
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="https://contentquality.com/mynewtester/cynthia.exe?Url1=https://example.com<txp:page_url />">508</a>
HTML output:
<a href="https://contentquality.com/mynewtester/cynthia.exe?Url1=https://example.com/">508</a>
<!-- or -->
<a
href="https://contentquality.com/mynewtester/cynthia.exe?Url1=https://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: https://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!