Making pages clearer - easy Disability Discrimination Act Compliance
Archive - Originally posted on "The Horse's Mouth" - 2006-09-23 09:32:56 - Graham Ellis
Welcome to the new, clearer, Horse's Mouth. You should spot that the text size is slightly larger, and contrasts better against the background. And if you're not keen on the new look, you are now empowered to change it to suit your own preference - simply click on the "customise" link on the right of the main page, and you'll be able to choose the colour combination and font size you want in another window, then choose "reload" that's just to the right of customise. If you're viewing this page on the archive, then the "Accessibility" menu will let you make a new selection ... and whichever way your selection is made, it'll be remembered for subsequent pages via a cookie.
The MovableType software that I use for this daily update is an excellent piece of software - but it's written and updated outside Europe, and doesn't necessarily conform to UK and European requirements. If this update provides a service, and I guess it does, then I'm required under DDA to make all practical efforts to make it equally accessible to everyone if asked, be they colour blind, or if they find a tiny text hard to read. Plenty more information from folks like the RNIB.
I could, probably, have claimed that I'm not providing a service when asked - that this is just a personal daily note. But I don't feel that's morally the correct position to take. Nor is it the correct long term business position to take - I want readers, and happy, non-struggling readers too.
Our main site and business is already DDA compliant - we've taken all reasonable steps to provide a level playing field, or one that's biased in favour of people with a disability ... but how to do it with a standard piece of software? It turns out that PHP and style sheets come to the rescue; the HTML pages are unchanged, but the style sheet is dynamically generated to meet the individual's request.
Here's part of the top of the style sheet code :
<?php
header("content-type: text/css");
if ($_COOKIE["whcmy"]) {
@mysql_pconnect((database login info));
@mysql_select_db($sqlaccount);
$q = @mysql_query(
"select * from whcmy where userkey = '$_COOKIE[whcmy]'");
if ($row = @mysql_fetch_assoc($q)) {
$fontsize = $row[fontsize];
}
}
$bfsize = 12;
if ($fontsize == 4) $bfsize = 10;
?>
And within the CSS code, you'll find things like:
#banner h1 {
font-size: <?= $bfsize+12 ?>px;
If you want to learn more about using style sheets in this way, the RNIB offer abasic course at the HTML and CSS level - see here, and we at Well House Consultants can provide you with PHP training, MySQL database training, and so on so that you can automate and integrate DDA compliance. Not only does it makes legal sense ... it also makes moral and business sense.