RE: table captions

RUST Randal wrote:

> If I have a page called "Categories," and all it does is 
> display a table of records from a database for my categories,
> do I need to also add a caption
> to the Table with the value "Categories?"

The WAI Guidelines and associated technique documents are not absolutely
clear as regards to the necessity of <caption> elements. At
http://www.w3.org/TR/WCAG10-HTML-TECHS/#data-tables
they say:

"Provide a caption via the CAPTION element. A table caption describes the
nature of the table in one to three sentences. - -
A caption may not always be necessary. 
If a CAPTION is not provided, use the "title" attribute on the TABLE element
to describe the nature of the table in a few words."

And then they discuss the summary="..." attribute. This has always been a
bit confusing to me, especially since there's often the possibility of, and
good reasons for, using a heading before the table, as in your case: 

> <h1>Categories</h1>
> 
> <table>
> <caption>Categories</caption.
> </table>

Besides, when a (data) table is the only content of a page, the <title>
element should, naturally, describe the table too, though in "global
context".

So I'd say we need some clarification on the detailed purposes of the
various texts used to characterize a data table. Moreover, I think there
should be a separate requirement that data in a table be preceded by some
information that describes the table. Whether this is done in <h1> or
<caption> or a <p> or a combination thereof is less important. I think it is
important to have it as content proper rather than in an attribute value.
The rationale is that when tabular data is accessed, it is crucial that the
user know what's coming, especially (but not only) in purely linear
presentation, like speech or Braille or linearized visual presentation.

It could be a good idea to try to give each table a <caption>. In principle,
it is a way to associate descriptive text with the table _structurally_: by
the very syntax of HTML, a <caption> is a caption for a specific <table>. An
<h1> element is not that way associated with an element that follows it.

And often you could use _different_ texts. The journalist's rule is that a
heading should contain three or four words, at least one of which is an
active verb. We can't always write journalistically good headings, but it
often pays off to aim at them. So your <h1> could be short and impressive,
saying some practical conclusion drawn from the tabular data (though this is
admittedly difficult if the page is automatically generated!) whereas the
<caption> should be more objective and general, describing the table as a
table. Even for automatically generated tables of data, there could be a way
to use a short heading and longer (and more technical) caption.

-- 
Jukka Korpela, senior adviser
TIEKE Finnish Information Society Development Centre
http://www.tieke.fi
Phone: +358 9 4763 0397 Fax: +358 9 4763 0399 

Received on Friday, 14 June 2002 03:02:43 UTC