[thelist] Accessibility and Proper Tabular Data Markup or Overkill?

Christian Heilmann lists at onlinetools.org
Thu Jan 20 17:13:51 CST 2005


Jono wrote:

> Marking up tables to be as accessible as possible is always a good 
> idea, but in very simple tables, can it be overkill?   For example, a 
> small table such as the one below:
>
> <table summary="This table contains contact information for blah blah 
> bah">
>     <tr>
>         <th id="name" align="right"><b>Name</b></th>
>         <td headers="name" >Mr. So Andso</td>
>     </tr>
>     <tr>
>         <th id="office" align="right"><b>Office</b></th>
>         <td headers="office">Office of Table markup</td>
>     </tr>
>     <tr>
>         <th id="phone" align="right"><b>Phone</b></th>
>         <td headers="phone">555-555-5785</td>
>     </tr>
>     <tr>
>         <th id="email" align="right"><b>Email</b></th>
>         <td headers="email"><a 
> href="mailto:name at domain.com">name at domain.com</a></td>
>     </tr>
> </table>
>
> Since tabular data is read,  in rows - from left to right by default, 
> and since there are only two columns of data, is the above example 
> correct, overkill, or just plain wrong?  I'm trying to get the hang of 
> accessible tables, so any quick help or tips is appreciated.


Well, you can use the scope attribute instead of  id/headers pairs, 
that'll make things a lot easier.
Also, don't add visual attributes like align and b to the TH, simply set 
it  in the CSS

TH  {text-align:right;} (browsers adds bold text by default)

More info on the correct markup and how to  style it. 
http://www.icant.co.uk/forreview/tables/*

HTH
Chris

*



More information about the thelist mailing list