Translations of this article are available.
Accessibility is not only about supporting disabled visitors, even if that is one of the most important reasons for making a website accessible. An accessible website works better for everybody, disabled or not, and can be accessed by more people with more kinds of web browsers and other browsing devices.
A common misconception is that by making a website accessible, it will look less attractive than, or different to, a website that is not accessible. That is not the case. Accessibility does not need to affect presentation at all.
Here’s an example of how accessibility can help everybody: A website has a form which can be used to register for a seminar. In the form, you can choose to attend the seminar in one of three cities. Each city name is next to a radio button. If the creator of the form didn’t have accessibility in mind, anyone using a graphical browser has to place their cursor on the tiny radio button and click in order to choose a city. If the developer knows about accessibility, and has marked up the labels next to each radio button with the <label> element, you will also be able to click on the city names to choose a location. Which way is simpler for anyone using the form?
Using semantic, well structured XHTML will take you a long the way towards an accessible website. To get a basic idea of how accessible a document is, try viewing it in a text-based browser like Lynx to see if the content still makes sense. This is far from the only accessibility check you need to do, but it’s a good start.
Many web designers like using frames to divide the browser window into several independent parts, each consisting of a separate HTML document. This may be useful for something like an Intranet application. On a public website, however, there are many drawbacks to using frames:
robots.txt to tell search engines not to index sub pages. On other sites, JavaScript is used to send anyone who arrives at the site from a search engine to the homepage. Both of these methods may work, if the goal is to get fewer visitors.Besides, you are making things harder on yourself. Frames make a website more technically complex.
It’s pretty common for people to interpret “don’t use tables for layout” as “don’t use tables at all”. That is not how it should be interpreted. If what you’re marking up is tabular data, it belongs in a table, so a table is what you should use. However, it is important to know that when building data tables, there are many ways to make them more logical and accessible.
Links to articles describing how to build accessible tables.
An article on how to use tables for tabular data.
Forms are often unnecessarily difficult to use, partly because they are built in illogical ways, partly because the underlying HTML code isn’t using the elements that exist to make forms more accessible and easier to use. The elements <label>, <fieldset> and <legend> exist and are meant to be used.
A common question is what to use to layout a form. Some say that a form can be considered tabular data, and should be marked up with a table, while others say that CSS should be used. Use either method, but if you use a table, make sure the form makes sense and is usable when the table containing the form is linearized.
A WebAIM article on accessible forms.
An article that goes through the basics of building better, more accessible forms.
Avoid depending on JavaScript. More people than you might think have JavaScript turned off in their browser, be it for security reasons or to avoid pop-up windows. They may also be using a browser which doesn’t support JavaScript. According to TheCounter.com, 6% of web users have no JavaScript. W3Schools.com reports 8%.
In most cases where JavaScript is being used, it doesn’t actually benefit the visitor. Of course there are cases where JavaScript can be used to provide a better experience. One example is validating form input.
Note that this does not mean that you should avoid using JavaScript. It does mean that you should avoid making a website depend on JavaScript to work.
The same thing goes for cookies. Do not use cookies in a way that makes the web site stop working if the visitor doesn’t accept them.
Comments, questions or suggestions? Please let me know.
© Copyright 2004–2006 Roger Johansson