So your site didn’t pass all of the tests. How do you fix it? Or better, how do you build a new site that will pass the tests and meet accessibility requirements, like WCAG and Section 508?
Start with these checklists, geared towards passing the tests in part two. Then end with one of the free, online accessibility validators (about which I’ll write soon).
These should really be true for any web site, but are particularly important for sites that need to be accessible.
<b> and <i>, instead use semantic tags like <em> and <strong>. Avoid style attributes, instead using id or class and keeping the styles where they belong: in a style sheet.<div>s and float directives, instead.To ensure your layout scales with the text, try to answer “yes” to these questions:
font-size settings are in percent (ie: font-size: 120%). This makes the relative text sizes the same, regardless of base size. (Using ems is also acceptable, but harder to follow.)ems?<div> or <p>*. Heights may also be in percent. Remember that the average width of one letter is 0.5em, and that 45 to 80 characters per line is considered readable, and 66 is considered standard. That means main text content should be between 22.5em and 40em wide.*: Images tags have their own height and width attributes, which must be in pixels. This is an acceptable exception. As you change the font-size, the text may not flow perfectly around images which remain fixed. Accept it.
Disabling images should never remove content or create low-contrast situations.
background-image also have a background-color?content div has a white background image, it should also have a white background color.alt tags to your images and embeds. Some of the best advice I ever got was “if the picture isn’t worth describing well, why is it there at all?” (alt tags are required, anyway. The important part here is being meaningful.)This is the hard part. While it’s relatively easy to properly structure new pages, it can be very difficult to go back and restructure old one, especially if you were bad and used layout tables.
When creating a new site, start with the content. When I start a new design, I always* lay out the content in outline order before I even begin to consider the layout.
*: Ok, that’s a lie. People don’t always give you the content at the beginning. They should, but they don’t.
<h2> can follow <h1> but <h3> can’t. (However, <h2> can follow <h3>, just like an outline.)<h1> element?<h1> elements. I use <h1> for the site or page title, and only once on a page.<div id="right_column"> means nothing with style sheets turned off. <div id="content"> or <div id="user_info">, however, are still meaningful. Semantic names help you organize your content for all users, and this organization is, again, particularly important without style sheets.This checklist is pretty short, but it would have been much longer if I hadn’t worked so hard on it.
By answering “yes” to all the questions on this checklist, you should be in a position to easily pass any of these validators. I’m not promising: your site may have other issues that I don’t address here. But with this starting point, it should only take a few minutes to fix any problems that arise with the validators.
Just click on through to any of these, which can help you validate your site.
Read the rest of the series:
Follow Me