[thelist] RE: PHP & Accessibility

Steve Lewis nepolon at worlddomination.net
Thu Aug 21 15:02:44 CDT 2003

Andre Genic wrote:

>Thanks for the suggestions so far, as for why I raised this subject, I've
>been reading with interest about accessibility via .NET a UK internet mag,
>whether they are spicing things up to create a sort of panic I don't know.
.NET is a different beast because it tries to integrate all kinds of 
fabulous Microsoft product-specific functionality into a client-server 
framework that is larger than the HTTP protocol.  In this way it ties 
browser behavior to the web server in special ways.

PHP is used as a server-side technology. While it is the developer's 
responsibility to address the issue of accessibility there is nothing in 
PHP which addresses this because accessibility is a concern isolated to 
the browser-side of the experience, not the web server.  You need to 
write accessible HTML with your PHP code, but there is nothing in PHP 
that helps or hinders the accessibility of the resulting HTML.

>As for the tables I use to display data, they are a mess, and I mean a mess,
>perhaps it's time I dabbled with CSS to generate tables, perhaps there
>should be some clear definitions and guidelines for developers and I mean in
>a definitive way, perhaps their is already, and I've completely missed it.
Take little steps.  Work on eliminating one table that has two layout 
elements side by side, regardless of whether there are three or four 
nested tables inside them.  If you can remove one simple instance of 
tables-as-layout you have made a big step forward.  Look for areas that 
look like they would be easiest to clean up, then work on the harder 
ones later as your proficiency and confidence improves.  Expect to spend 
some time, and it is ok to back out of a change and try another one that 
turns out to be easier.

Baking cookies will always be easier than any sort of application/web 
development.  If we could reduce development to a foolproof process, 
some genius would write a program that would write all the rest of the 
programs we need for us, and I would be sipping lemonade in the sun 
instead of sitting in this chair. :) 

A couple of clarifications for you:  Tables are good for tabular data.  
Tables are often not necessary for layout.  Depending on the complexity 
of the layout you are working on, sometimes you are reduced to having to 
use tables.  <irony>Always avoid absolutes</irony> (such as "Never use 
tables," or even "Never use tables for layout"). Also, CSS doesn't 
generate tables, but using CSS to modify the display of tables, divs, 
headers (h1 h2 etc), paragraphs, lists, to get the layout you want.  CSS 
isn't a magic bullet, and browsers are not yet ready for all HTML to be 
clear of display-oriented markup but we can move in that direction and 
often get very good results.

A good starter-reference for writting CSS (a tutorial and reference 
combined) is available at http://www.w3schools.com/css

>But I would sooner make sites that are accessible, there would be nothing
>worse than getting a big client, developing their site, only for them to get
>sued, after all it all comes back to the developer.
First define accessibility:

Now use bobby to look at some of your favorite websites and see how they 
rate.  Bobby tries to programatically evaluate the accessibility of a page:

Note that Bobby has limitations:  it isn't able to really understand the 
content or context of a web page, it isn't able to see the images with 
real eyes to detect poor color choices (affecting those with color 
blindness for instance), etc.  It doesn't allow exceptions to it's 
rules, and will always complain about the same things.  You should 
consider Bobby's response as feedback, not a religious document, and 
update your pages accordingly.  Are the problems Bobby lists going to 
impair a user's ability to navigate?  to extract content?  How friendly 
is it to folks with dissabilities? (are a bunch of ads and navigation 
items read by a screen reader before the content of the page?)  
Determine how far you feel you want to go to answer the needs of the 
client AND provide reasonable accessibility.

CSS can help you improve the accessibility of your work, but most of the 
work involved in improving accessibility will still reside in the HTML.  
The specific advantage of CSS is that it can help you eliminate some of 
the problematic and complex HTML that you would normally have in a 
highly complex layout.

>P.S. Is there any sites you can think of off hand that are 100% accesible,
>links would be greatly appreciated.
Can't say that I have looked but I will say agian, always avoid 
absolutes! :)


More information about the thelist mailing list