Using the Scope Attribute in Tables

From Techniques for WCAG 2.0, http://www.w3.org/TR/WCAG20-TECHS/H63.html

The row and col values of the scope attribute are currently supported to a large extent by most current versions of JAWS. However, there are still some problems and WindowEyes support for scope is inconsistent. The same is true for Japanese versions of these screen readers. Versions of JAWS prior to version 5 and older versions of WindowsEyes have inconsistent support for scope.

At the current time, those who want to ensure consistent support across Assistive Technologies for tables where the headers are not in the first row/column may want to use the technique for complex tables H43: Using id and headers attributes to associate data cells with header cells in data tables. For simple tables that have headers in the first column or row we recommend the use of the th and td elements.

Authors may wish to use table data <td> instead of table headers <th> for various reasons. One example might be to prevent CSS markup in the table. In those cases, the table can be marked up with the scope attribute.

Examples of scope attribute:

Table with No <th> Tags Using the Scope Attribute

To test this with JAWS you first need to tell JAWS to look for only marked headers. Here's how:

  1. Press INSERT+V to open the Adjust JAWS Options dialog box.
  2. Press T until you find Table Titles Announce - Both Row and Column.
  3. Press SPACEBAR to change this to Table Titles Announce - Only Marked Headers.
  4. Move into the table and navigate left and right using JAWS table reading keystrokes CTRL+ALT+RIGHT or LEFT ARROW in rows 2 through 5. You should be hearing the column headings in row one announced before the contents of each cell.

TV Listings Using Scope for Headers Instead of TH Attributes

8:00 PM 8:30 PM 9:00 PM 9:30 PM 10:00 PM 10:30 PM
ABC Scrubs Better Off Ted Lost The Unusuals
CBS The New Adventures of Old Christine Gary Unmarried Criminal Minds CSI: NY
FOX Bones American Idol Fox 5 News at 10
NBC Law & Order Law & Order: Special Victims Unit Law & Order

JAWS should also read the items in column one as headers since they are marked up with the scope="row" attribute. In this case, make sure JAWS is looking for marked headers as mentioned above. Then use table reading keys to move up and down columns 2 through 7.

Prior page

Next page