Current Posts

Podcast #36: Complex Data Tables

In addition to a nice caption tag and summary attribute, you may know that a data table requires table header cells (TH) for the header rows and/or columns, and a scope attribute (see Web Axe episode 3, Data Tables). But what is there is more than one row of headers? This is called a complex table, and a different type of coding should be used.

Download Web Axe Episode 36 (Complex Data Tables)

A complex table: Links:
Sample code (modified from WebAIM):

<table summary="Name, birthdate, and age of Shelly's daughters. Also organized by children by birth and by marriage.">
<caption>Shelly's Daughters</caption>
<tr>
<td></td>
<th id="name">Name</th>
<th id="age">Age</th>
<th id="birthday">Birthday</th>
</tr>
<tr>
<th rowspan="2" id="birth">by birth</th>
<th id="jackie">Jackie</th>
<td headers="birth jackie age">5</td>
<td headers="birth jackie birthday">April 5</td>
</tr>
<tr>
<th id="beth">Beth</th>
<td headers="birth beth age">8</td>
<td headers="birth beth birthday">January 14</td>
</tr>
<tr>
<th id="step">by marriage</th>
<th id="jenny">Jenny</th>
<td headers ="step jenny age">12</td>
<td headers="step jenny birthday">Feb 12</td>
</tr>
</table>

Labels: , , , , , ,

3 Comments:

At 5:26 AM, Anonymous Anonymous said...

Purely from an accessibility point of view, what happens in a situation where there are nested tables?

Or, would you consider that a failure on the part of the developer to have to use nested tables in the first place?

I've had to use nested tables before now for very complex product data (mechanical tolerances and tolerance ranges) and they look hideous...

 
At 7:37 AM, Blogger Dennis Lembree said...

Hello Wayne. You should never have nested data tables. I suggest trying the following: use header columns as well as header rows; separate your data in more than one table; simplify the content and put detailed information in hyperlinked pages.

 
At 2:35 PM, Anonymous Anonymous said...

Hi Dennis!

The tables in question where a representation of data from a printed document.

What I created with tables was an almost exact duplicate of the tables in the printed document.

I had a meeting with the client late last week and I did discuss this with them, but the fact of the matter is, while accessibility is a matter of course for anything I produce, the audience for their products is pretty well-defined.

You just don't see physically or visually impaired mechanical engineers!

I know that sounds glib, but the clients customer demographics tell the story and the money has to follow that.

As I mentioned, the new website will be standards-compliant from the ground up, but I just needed some guidance on the tables situation.

Thanks for the input...

 

Post a Comment

<< Home

RSS icon; follow the RSS feed for Web Axe
Twitter icon; follow Web Axe on Twitter

Like Web Axe?

Podcast Alley

Odeo

Mapper on Frappr

Add yourself to the Web Accessibility Enthusiasts mapper

Previous Posts