Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^322) Chapter 8 Tables


Accessibility and Tables


This chapter has introduced two recommended methods to increase the accessibility of
tables:
●Use <th>elements to indicate column or row headings.
●Use the summaryattribute on the table element to provide an overview of the
table contents.
If you are coding a simple data (informational) table it is sufficient to code <th>tags to
indicate row or column headers. However, for more complex tables the group recom-
mends specifically associating the table cell values with their corresponding headers.
This technique uses the idattribute (usually in a <th>element) to identify a specific
header cell and the headersattributein a <td>element. Figure 8.18 shows a table that
has been configured in this manner.

Figure 8.17
Sample
services.html


Figure 8.18
This informational
table was coded
with techniques to
improve accessibility


WWW


Focus on Accessibility


The XHTML code for the table follows:
<table border="1" width="75%" summary="This table lists educational
background. Each row describes educational experience at a specific
school. Columns contain school attended, years, subject, and degree
awarded.">
Free download pdf