View Single Post
  #4 (permalink)  
Old 09-23-2003, 03:10 PM
ScottNorton's Avatar
ScottNorton ScottNorton is offline
WebProWorld Member
 

Join Date: Jul 2003
Location: Arlington, VA
Posts: 26
ScottNorton RepRank 0
Default <th> tags and scope for accessible tables

If you have a very simple table and mark your row and column headings with <th>, you don't need the scope attributes. In your sample table, the <th>'s will do their job just fine and as the user navigates through the table, JAWS will read the row or column heading (whichever one changes).

Scope is useful in two cases:
  1. Complex tables, where an interior <th> could be a row or a column heading
  2. <td> headings.

A <td> heading sounds like a contradiction in terms, but is really useful and sensible. The W3C accessibility pages use an example sort of like this:

Code:
Drink    Senators    Representatives
-------    ----------    -----------------
Coffee      23           95
Water       18           27
Tea            5            18
In that table, the drink names are data and should be marked with a <td> tag, but they are also the heading for the row, so that if you went down the Senators column, your would want the browser to read "Senators. Coffee, 23. Water, 18. Tea, 5." <td scope="col"> makes that happen.
__________________
Scott Norton
DTI Associates, Inc.
SNorton@DTIHQ.com
or Norton@ACM.org
Reply With Quote