WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: An Accessible method of hiding HTML content


From: Paul Bohman
Date: Jun 4, 2004 10:11AM

I'm glad to see that there are some comments on this list about my
article about hiding content
(http://www.webaim.org/techniques/articles/hiddentext). When I wrote
that article, I did so knowing that the very concept of hiding content
is a controversial one.

The technique works. The questions now are these:

- should it be used?
- if so, where, and under what circumstances?

1. Should it be used?

I'm not going to pretend that this technique should be used everywhere.
I won't even claim that all of the examples in my article represent
ideal situations in which to use the technique. They are merely ideas
and possibilities.

The technique itself was born out of necessity. There are Web designers
out there who are true designers. They are artists, and, being an artist
myself, I understand their perspective. Attractive visual designs are
not superfluous. They have the potential to increase user enjoyment,
site usability, and content comprehension. These are not trivial
matters. Visual design is important, just as accessibility is important.
They are not mutually exclusive. In fact, they are complimentary.

On the other hand, there are some rare circumstances in which visual
design seems to be at odds with accessibility. Rather than deny artists
their creative freedom, why not try to solve the problem in a way that
is productive from both an accessibility standpoint and an artistic

So my answer to the question of whether or not it should be used, is
"yes, when necessary." That, of course, brings us to the next question:

2. Where and under what circumstances should this technique be used?

After writing the article, a reader pointed out that using background
images for necessary text (such as headings) using the technique I
describe in the article is accessible to screen reader users, but not
necessarily to all users with low vision. Some users with low vision
change the background colors without overriding the entire style sheet.
If they override the entire style sheet, then there is no problem,
because the text will display properly, in the correct location.
However, if they turn off only the background styles, then the text
remains hidden and the background image also disappears. This creates an
instance of a missing heading.

This is an example of a situation in which my technique is less than
ideal. I could try to defend the technique by saying that it's an issue
that browsers can solve, which is partly true, but I have to admit that
it is still a problem here in the real world. I'll probably put some
comments in the article that discuss this potential problem.

On the other hand, there are some situations in which I think the
technique can be used beneficially. I personally use the technique to
"Provide Contextual Cues Just for Screen Reader Users" as discussed in
the article. There are situations in which the visual design
communicates a sense of organization and structure which simply cannot
be conveyed in the simplistic structural tags of HTML, no matter how
hard we try. Heading tags, bulleted lists, and so on do not have the
same organizational power as cleverly designed visual interfaces with
visual groupings and other visual elements. There is just no comparison.

To make up for this deficiency, it can be beneficial to add little bits
of text that explain some of these organizational elements to screen
reader users. You can say such things as "begin sub-menu", "end
sub-menu", "begin main content", or whatever. Sighted users don't need
this information, because they already have this information.

In a sense, you are providing a "text alternative" to the visual
organization of the page. Think about that concept for just a moment.
Think about how much information and orientation cues are lost on
complex sites when you can't see them. Why not provide a text
alternative for this information? The concept of text alternatives is
not limited to images alone. The concept applies to *anything* that is
not represented in text. Not all of these elements are important or
useful, but if they are, wouldn't you want to convey this information to
all users?

Not every site design needs these bits of text, but complex sites can
definitely be made more usable by helping screen reader users orient
themselves a little better.

Can this technique be over-used and abused? Of course. Any technique
can. Just make sure that *you* are not the one abusing it!

Paul Bohman
Project Coordinator
WebAIM (Web Accessibility in Mind)
Utah State University

Web Accessibility Coordination & Leadership Online Training
Starts June 1, 2004
Sign up now at http://www.webaim.org/events/symposium/