This essay assumes you know what cascading style sheets are, you just don’t know why you should use them. If you don’t know what CSS is, the Open Directory maintains an excellent directory of CSS tutorials.
we’ve already covered technical, aesthetic, and business arguments for CSS. It promotes separation of content and design. It eases maintenance. It can even save you money if you use it wisely. Now for the moral argument. The moral argument for CSS is accessibility.
These days, if you own any kind of public building (store, office, school, library, etc.) in the United States, you need to make sure that people in wheelchairs can get in the front door, move around the premises, use the bathrooms, and generally do everything that people not in wheelchairs can do. This requires a multi-pronged approach. If you have stairs leading up to your entrance, you need a wheelchair ramp or a separate wheelchair-accessible entrance. If you have multiple floors, you need accessible elevators. If you have bathrooms, they need a stall with wider doors and handrails. And so forth.
This is all now so commonplace that it seems odd to even elaborate on it. But it was not always this way. Prior to 1990, accessibility in the real world was haphazard at best. But on July 26, 1990, President Bush (Sr.) signed into law the Americans With Disabilities Act, which mandated this sort of equal access. Store owners and overworked bureaucrats bitched and moaned. There was a flurry of accessibility-related lawsuits. Accessibility advocates sued cities to provide wheelchair mini-ramps on all curbsides — and won. Students sued universities to create accessible dorms — and won. Eventually, companies and institutions absorbed the increased cost of doing business and got on with life.
Then an interesting thing happened. Instead of just slapping “accessible” quick-fixes on existing designs, people started rethinking designs from the ground up. It turns out that, if you design for everyone (not just sighted, hearing, able-bodied people), there are enormous benefits for everyone (even for sighted, hearing, able-bodied people). This is the concept of universal design: having one intelligent design that accomodates everyone in a group can be better for each individual in the group than maintaining separate designs for each person. An entrance without stairs is better for people in wheelchairs (who don’t need to navigate a lengthy ramp), but it’s also better for people carrying suitcases, people with strollers, and terminally clumsy people who just trip on stairs all the time. It’s also better for the building owner in the long run, not only because federal law would mandate a separate accessible ramp, but because it increases business (the easier it is for people to come in, the more likely they are to give you money once they’re inside) and reduces accidents (which can lead to lawsuits).
How does this relate to the web? The web in 2002 is like the physical world in 1991: the rules of the game have changed, but not everyone has noticed yet. The same government that mandated real-world accessibility then is now mandating accessibility on the web (for all federal websites). Meanwhile, companies that don’t provide accessible sites are finding they are losing both revenue and credibility. At the same time, most people still view accessibility as an expensive “add-on”, just another cost of doing business. Thus, stores have separate text-only sites, news sites have separate “Print story” pages, and content management systems have options to generate separate text-only versions of each page.
In one sense, having separate text-only pages “solves” the accessibility “problem” — the content is in fact accessible to everyone, and if the feature is built into your content management system, your accessible content is guaranteed to stay in sync with your inaccessible content. So why does the W3 consortium, in their long but surprisingly well-thought-out accessibility guidelines, call a separate text-only page a last resort? Because, no matter how well-implemented, it’s a hack. It treats accessibility as a problem, and sets about to solve it in the quickest and dirtiest way possible. Along the way, it breaks the fundamental premise of the web: that this content is available at this address.
There are real-world parallels to the “text-only” page. I have seen ATMs with one step up to a platform, and a little sign next to the step that reads “a wheelchair-accessible ATM is available at [some intersection two blocks away]“. Congratulations, you have met your legal obligations — and done absolutely nothing that benefits you or any of your customers. In the same way, a web site that relies on separate text-only pages is “accessible” in a very narrow sense, but step back for a minute and think about the end user experience. Someone with a text-only browser follows a link to an article halfway down a page deep within your site. Now what? Do they have to hunt around the page for the “text-only” or “printer-friendly” link? If it’s on the page somewhere, can they even find it? (I have seen news sites with a “print this story” image link with no ALT tag.) Or do they have to navigate back to your home page, click on the link to take them to your separate text-only site, and re-find the article they want? you’ve “solved” the accessibility “problem” by making a problem (”oh, you need to have text?!? [grumble grumble]“) and providing a solution… but you haven’t really solved anything.
So where does CSS fit into this? CSS is a crucial part of universal design. Not “separate-but-accessible” design, but universal design. One page accomodates everyone: people with desktop PCs with modern web browsers, people on older PCs with older web browsers, people using WebTV, people using text-only browsers, people printing your web page, people with Braille readers, people with speech synthesizers. Each client device selects the best stylesheet it can handle (maybe the most complex one, maybe a device-specific one, or maybe no stylesheet at all), and the content of the page is rendered appropriately. This selection happens automatically, without user intervention. This means people coming to your site from an outside link don’t need to hunt around for a separate accessible site, because your site is universally accessible. No separate wheelchair ramps, just come right in. Oh, you have small children? I’ll bet you didn’t even notice that you could wheel them right in, too (but you did).
Common criticisms against CSS:
Reactions? Corrections? Criticisms? Email me.
§
I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)
§
firehose ‧ code ‧ music ‧ planet
© 2001–8 Mark Pilgrim