W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2006

data table markup - minimal OK or need to specify headers?

From: Rebecca Cox <rebecca.cox@signify.co.nz>
Date: Thu, 2 Feb 2006 18:43:16 +1300
To: <w3c-wai-ig@w3.org>
Message-Id: <20060202054322.0690C5AED@hume.signify.co.nz>

Hi all,

I am working on some data tables and have come up with a few things that I wanted to get some feedback on. Apologies for the long email, just for anyone out there who is very interested in data tables! :)

I'm referring to these articles:

Roger Hudson "Accessible Data Tables"

Joe Clark "Building Accessible Websites" Chapter 10

W3C WAI HTML Techniques for WCAG 1.0
(see the example table immediately following the text "The following example shows how to create categories within a table using the "axis" attribute." (but ignoring the axis attribute)

Jim Thatcher's wai-ig post:

Also useful is a feature in the Firefox Web Developer extension (version 1.0.1) under Information then "Display table information". This will display summary text, abbreviations for table headers, and what headers have been defined for a cell.

I've made three sample pages and have to decide between following one of the three approaches taken in these. (The information given in the table is identical in the three examples.)


This has minimal markup - horizontal and vertical headers are marked "th" but no associations are marked up between headers and data cells. 

Reading Jim Thatcher's post this seems OK, as none of the data cells in the table have headers not in their column or row. I'm a bit nervous about using this approach though, as its so little effort!

One thing that could be a problem with this markup, especially with different content, would be how you tell how many rows the header "Expenses" applies to. (All but the final row I would guess for this table, but the content rather than the markup tells me this.)


This has ALL applicable headers marked up for every th and td. Seems overly verbose especially as some of the layered headers seem unnecessary. For example, nobody needs to know that "Revenue - Crown" has the header "Revenue".


This is what I prefer. I've removed any header - cell association markup where this wouldn't give any extra useful information.

Note the differences between the lists of headers for data cells in the "Expenses" and "Revenue" sections.

Small note here - Joe Clark sort of does this, in his book chapter link given above, there is some table HTML following the text "The most specific id of each row is the last one, so the other two could be left out". 

Trimming the lists of headers given as he has done in this example is wrong, eg for headers="males-ns-grade" you would only get the header information "Grade school" not "Males, Nova Scotia, Grade school" - unless the parent headers are also given by the user agent. Does anyone know if this is the case?

And just a few assumptions about what I'm not asking about:

This is not a question about how to write the "summary" attribute.

I'm using id and headers rather than scope to associate headers with data cells (due to screen reader support as explained in Roger Hudson link.) 

Where a cell both HAS a header and functions AS a header for other cells, in most cases I'm marking this as a td not a th. (see WCAG techs link.)

Any thoughts on any of this? I'm most interested in what people think of the three options.

Many thanks,
Received on Thursday, 2 February 2006 05:43:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:33 UTC