- Use TD elements for data cells
- For simple tables use TH or THEAD elements to indicate headers
- Use SCOPE and HEADER attributes to indicate relationships
between headers and data cells
- Define the CAPTION element to title the table
- Use the SUMMARY attribute of the TABLE element to provide
additional information on the purpose of the table in the document
- Use AXIS attribute of TD and TH to indicate conceptual
categories
Accessible Table using "Scope"
"Scope" must have one of the following values: "row", "col",
"rowgroup", or "colgroup." Scope specifies the set of data cells to be
associated with the current header cell. This method is particularly useful for
simple tables. It should be noted that the spoken rendering of this table would
be identical to that of the previous example. A choice between the "headers"
and "scope" attributes is dependent on the complexity of the table. It does not
affect the output so long as the relationships between header and data cells
are made clear in the markup.
Student GPA Data
| Year |
4.0 |
3.9 - 3.0 |
2.9 - 2.0 |
1.9 - 1.0 |
0.9 - 0.0 |
| Freshmen |
26% |
23% |
31% |
12% |
8% |
| Sophmore |
30% |
25% |
35% |
7% |
3% |
| Junior |
33% |
28% |
34% |
3% |
2% |
| Senion |
32% |
33% |
32% |
2% |
1% |
<TABLE border="2"
summary="This table charts student GPA data.">
<
CAPTION>Student GPA Data</CAPTION>
<
TR>
<TH
SCOPE="col">Year</TH>
<TH SCOPE="col"> 4.0
</TH>
<TH
SCOPE="col"> 3.9 - 3.0 </TH>
<TH SCOPE="col"> 2.9 - 2.0
</TH>
<TH
SCOPE="col"> 1.9 - 1.0 </TH>
<TH SCOPE="col"> 0.9 -
0.0</TH>
< /TR>
<
TR>
<TH
SCOPE="row">Freshmen>
<
TD>26%</TD>
<
TD>23%</TD>
<
TD>31%</TD>
<
TD>12%</TD>
<
TD>8%</TD>
< /TR>....
< /TABLE>
Result: A speech synthesizer might
render it by speaking the following:
Caption - Student GPA Data
Summary - This table charts student GPA data.
Year: Freshmen, 4.0: 26%, 3.9 - 3.0: 23%, 2.9 - 2.0: 31%, 1.9 -
1.0: 12%, 0.9 - 0.0: 8%
Year: Sophmore, 4.0: 30%, 3.9 - 3.0: 25%, 2.9 - 2.0: 35%, 1.9 -
1.0: 7%, 0.9 - 0.0: 3%
Year: Junior, 4.0: 33%, 3.9 - 3.0: 28%, 2.9 - 2.0: 34%, 1.9 - 1.0:
3%, 0.9 - 0.0: 2%
Year: Senior, 4.0: 32%, 3.9 - 3.0: 33%, 2.9 - 2.0: 32%, 1.9 - 1.0:
2%, 0.9 - 0.0: 1%
Accessible Table using "Headers"
The next example associates the same header (TH) and data (TD)
cells as before, but this time uses the "headers" attribute rather than
"scope". This example shows how to associate data cells (created with TD) with
their corresponding headers by means of the "headers" attribute. The "headers"
attribute specifies a list of header cells (row and column labels) associated
with the current data cell. This requires each header cell to have an "id"
attribute.
Student Data
| Last Name |
GPA |
Major |
Full Time |
| Baggins |
3.5 |
Chemistry |
No |
| Friday |
2.5 |
Aviation |
Yes |
| Stocking |
4.0 |
Undecided |
Yes |
<TABLE border="2"
summary="This table charts student data.">
<
CAPTION>Student Data</CAPTION>
<
TR>
<TH
ID="Last_Name"> Last Name </TH>
<TH ID="GPA"> GPA
</TH>
<TH
ID="Major"> Major </TH>
<TH ID="Full_Time"> Full Time
</TH>
< /TR>
<
TR>
< TD HEADERS="Last_Name">B.
Baggins</TD>
< TD HEADERS="GPA">3.5</TD>
<
TD HEADERS="Major">Chemistry</TD>
<
TD HEADERS="Full_Time">No</TD>
<
/TR>....
< /TABLE>
Result: A speech synthesizer might
render it by speaking the following:
Caption - Student Data
Summary - This table charts student data.
Name - Baggins, GPA 3.5, Major Chemistry, Full time No
Name - Friday, GPA 2.5, Major Aviation, Full time Yes
Name - Stocking, GPA 4.0, Major Undecided, Full time Yes
Non-Accessible Table
Student Data
| Last Name |
GPA |
Major |
Full Time |
| Baggins |
3.5 |
Chemistry |
No |
| Friday |
2.5 |
Aviation |
Yes |
| Stocking |
4.0 |
Undecided |
Yes |
<TABLE border="2"
summary="This table charts student data.">
<
CAPTION>Student Data</CAPTION>
<
TR>
<TD> Name
</TD>
<TD> GPA </TD>
<TD> Major
</TD>
<TD> Full Time </TD>
<
/TR>
< TR>
< TD>B.
Baggins</TD>
<
TD>3.5</TD>
<
TD>Chemistry</TD>
<
TD>No</TD>
< /TR>....
< /TABLE>
Other resources: W3C
Accessible Table Techniques
Automatic vs Manual: When using an
accessibility program, associations between information will require a suer
check becuase software is unable to determine if cells are truly header
information or if relationships are correct.