Accessible Websites

Web G

"Accessibility" is one of those words that seem like a fad on the World Wide Web: Everyone wants to have their website considered "accessible." But what does it mean?

The Meaning of Accessibility

Accessibility means that your website should be useable by the maximum amount of people possible who can appreciate the medium.

The Limits of Accessibility

You might be of the attitude that one person expressed as "I don't design for gimps," but that attitude is 1) deliberately offensive and 2) completely missing the point.

To be certain, there is very difficult to ensure that a website can be used by everyone. The absolute limit is that imposed by the content itself: If the site's content consists of drawing, painting or photography, it will be by nature inaccessible to the blind; music and other sounds will be by definition inaccessible to the deaf; videos will be inaccessible to those both blind and deaf; and writing—such as this essay—will be inaccessible to those who can't read English.

Of course, none of the above limitations is the user's fault as a rule. Blindness can result from any number of medical problems (the most common, I hear, being diabetes), deafness is much the same, and being illiterate in English can result from something so simple as:

  1. "Aku ngomong (boso) Jowo!"
  2. "Saya (bisa) berbicara bahasa Indonesia."
  3. "Я говорю на русском языке."

Each translates in their respective languages as "I speak..." 1) Javanese, 2) Indonesian, and 3) Russian.1

But this kind of thing is really beside the point.

What Should Be Able To Access Your Website?

A website that is accessible can be used by: Screen readers, tactile browsers, regular browsers, mobile browsers, web-tv, text-only browsers (like Lynx), lightweight browsers (such as Dillo)...

Sound like it's gonna get complicated? It isn't.

Real Accessibility

Real accessibility simply means making your websites easy to use. The way you do this is by coding them in such a way that they make sense.

It means using semantic markup—that is, using each element on your page for the purpose it was designed—to structure your page; avoiding presentational markup, i.e. markup chosen solely for the way it makes things look; using CSS to style your page, as it can be safely ignored by browsers that for whatever reason don't support it; and using client-side scripting in such a way that the page is still fully useable if that kind of scripting is not supported, but makes it easier to use the page if it is.

The best way to make a website accessible is to create things in this order: Content, which is whatever you want to display on the web; structure, which makes your content visible/usable on a website; presentation, which makes your website look pretty; and maybe behavior, which allows the user to temporarily alter the page in his browser.

You may have to alter the structure of the page to allow for styling or behavior, and some refinements are certainly acceptable, even necessary.

To begin with, for style sheets or script files to affect the page, there must be elements linking them to the webpage in question. If there isn't, those files will have no effect.

Aside from that, there are ways and means of altering or refining the structure to better allow for accessible styling and scripting.

The Advantages of CSS

Did you know that if you follow the advice above, a page will actually be simpler? I'm totally serious; your page will be easier for editors to follow, you can have more consistent styling, and website redesigns will be much faster. Because of the way CSS works, you will only need to update one file, instead of all your pages.

Browser Limitations

Now, I know some browsers don't support CSS. Here are three examples: Dillo, Internet Explorer 2, and Lynx. Here's why you don't need to worry about them.

Internet Explorer 2

Who in tarnation uses Internet Explorer 2?! The browser was last popular well over a decade ago; if anyone still uses it, they're running very old hardware. The earliest version of Internet Explorer for which there are any measurable statistics is Internet Explorer 4, which enjoys a usage of around 1%%.

No, that's not a typo. That can also be written as "1 percent of 1 percent", "1/10,000 of the everyone on the Internet", or "0.01%"—in any case, a vanishingly small number.

Dillo

Dillo is a very basic browser that has never had any support for CSS, ever. Nor does it support most other means of presentation.

Lynx

Lynx is a text-only browser, which means not only doesn't it support CSS or Javascript, it doesn't even support images.

Other Good Ideas

If you have a bunch of related links, put them into a list. Unordered lists usually work the best, but ordered or even definition lists will do well; the former if those links are to be followed in a specific order, the latter if each link is accompanied with a note about its contents.

Use appropriate headings. If your headings read like an outline of your document, you're on the right track.

Keep your document tree (that's a chart of which elements are nested in which) as simple as possible.

Make sure your pages are completely valid HTML, whichever version you use.

Use alt attributes in image tags to describe the graphic—particularly if that graphic is a link!

What All This Means About Accessible Websites

Let's say you use CSS alone for presentation, your structure is fully semantic with links in their lists and your headings describing their respective sections, and you've implemented the other good ideas, guess what: You're there! You've got an accessible website.

Not only that, but you've got a website that's likely easier to navigate, easier to edit, cheaper to maintain, and quite likely easier on your bandwidth, too.

I repeat, accessibility doesn't mean you "design for gimps." It means you make your webpage make easier for everyone to use.


Appendices

Appending A: Altering and Refining Webpage Structure

Below are ways that the structure of a webpage can be altered to allow for behavior and presentation, ranged from the best means to the worst.

Alterations and Refinements to allow for Presentation and Behavior
Alterations and Refinements Good or Bad Idea Explanation
Adding class and/or id attributes Excellent!

The class attribute describes what group of elements that particular element belongs to. Of course, you can have an element belong to more than one group.

This not only allows you to select which elements are assigned certain styles or behaviors, but also gives your page some extra documentation

.

The id—short for "identity"—attribute identifies one specific element; the ID cannot be used with any other element.

This allows presentation or behavior to be assigned to that one element. It also allows for other elements to reference it.

Adding <div> or <span> elements Good

The <div> element is a meaningless block element that allows you to divide up your page. It has little effect on the pages unstyled look, but is used to group content together for future styling and behavior. Use these judiciously, and use other block elements with more meaning when you can.

The <span> element is a meaningless inline element that allows you to choose small bits of text. It has little effect on the pages unstyled look, but is used to group content together for future styling and behavior. Use these judiciously, or better, see if any other inline element will do the job better.

Using the style attribute, using "javascript:" in the href attribute, or using click events Iffy

The style attribute applies style to one specific element, while using the "javascript:" pseudo-protocol or click events do the same with behaviour. The problem is that These can be hard to find and edit, and often cause bloated code. It is much better to target elements using id and class attributes.

Internal styles and scripts Iffy

It's fine if you're using a short script or a little style with one page. If you use that script in several pages, it's usually better to use external CSS and Javascript documents.

Adding <big>, <font>, <small> elements Bad These elements are ALL presentational markup. None of these should ever be used when working with a website. Remember to keep structure and presentation apart!
Using tables for layout Terrible!

A table lays things out on a grid, which can make things less fluid. Never, ever use a table for layout. It is allowable in one, and only one, case: If your page is intended to look like a spreadsheet (for example, if you have a table of albums, which includes lists of songs, artists, etc), but in that case, your page contains tabular data.

This, beyond almost anything else, will clog up your webpage and make it less accessible to others.

Appendix B: Semantic Elements

Below are semantic elements that you can use to structure your page.

Block Elements You Can Use Instead Of div

<address>
This is used to contain contact information, such as a street address.
<blockquote>
This is used for a quotation that's several paragraphs long.
<dl>, <dt>, <dd>
These are the definition list elements. <dl> refers to the definition list itself, <dt> is for the definition term, and <dd> contains the definition itself. These are best for things like glossaries.
<del>
This can be used when entire paragraphs have been deleted.
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>

These header elements are used for titles, subtitles, section titles, and so on. They are respectively known as:

<ins>
This is used to show when a large block of text has been inserted
<ol>, <ul>, <li>
These are the item list elements: <ol> refers to an ordered (i.e. numbered) list, <ul> means an unordered list, and <li> means the individual list items.
<p>
This element is for paragraphs.
<pre>
This is meant for pre-formatted text, i.e. text where you want whitespace (new lines, tabs, spaces, etc.) to be preserved.

Inline Elements You Can Use Instead Of span

<a>
Anchor, usually used for hyperlinks.
<abbr>
Abbreviation, used for words in shortened form.
<acronym>
A special kind of abbreviation that is a word made from the initials of the objects full title.
<bdo>
Bi-directional override, used for text that is supposed to go in the opposite direction that what is being used as default. For example, for English, <bdo> would be used if I wanted something to go right to left instead.
<cite>
A citation is used to show where you got information from.
<code>
Used to show that the text is an example of computer code.
<del>
Used to show that text is technically deleted.
<dfn>
Used to denote a definition.
<em>
Used to emphasize a word (that is, to put it in italics)
<ins>
Used to show when some text has been inserted.
<kbd>
Used to show an example of text entered by a keyboard.
<q>
Used to denote a short quotation.
<samp>
Used to show a sample of computer code or other text.
<strong>
Used to show strong text, i.e. text that is bold.
<sub>
Used for subscript text, like the denominator in a fraction: numerator/denominator
<sup>
Used for superscript text, like the numerator in a fraction: numerator/denominator
<tt>
Used for teletyped text.
<var>
Denotes a variable.

Appendix C: Footnotes

  1. In case you were wondering, I don't speak of those languages; these were translated with the help of friends.

Back To The Library