HTML and CSS Reference
In-Depth Information
Adding a Table Summary
Nonvisual browsers, such as aural browsers that often are used by visually impaired
people, can't display tables, and it's cumbersome for users to listen to each cell being
read. For these situations, it is useful to include a summary of a table's contents. While
a caption and the surrounding page text usually provide clues about a table and its
contents, the
summary
attribute allows you to include a more detailed description. The
syntax of the
summary
attribute is
<table summary=”
description
”> ... </table>
where
description
is a text string that describes the table's content and structure. The
summary
attribute fulfi lls the same role that the
alt
attribute accomplishes for inline
images: providing a textual (aural) alternative to essentially visual material. A user running
a screen reader or other type of aural browser fi rst will hear the summary of the table's
contents, which can aid in interpreting the subsequent reading of the table's content.
Kyle defi nitely wants the KPAF Web page to be accessible to users with all types of
disabilities, and he asks that you include a summary description of the program schedule.
To add a summary to the table:
◗
1.
Return to the
schedule.htm
file in your text editor.
◗
2.
Within the opening
<table>
tag, insert the following attribute, as shown in
Figure 5-21:
In some browsers, you can
view the summary descrip-
tion by right-clicking
the table and selecting
Properties from the short-
cut menu.
summary=”This table contains the nightly KPAF program schedule
aired from Bismarck, North Dakota. Program times are laid
out in thirty-minute increments from 6:00 p.m. to
10:00 p.m., Monday through Sunday night.”
Figure 5-21
Inserting a table summary
table summary
◗
3.
Save your changes to the file and then reload the
schedule.htm
file in your Web
browser. Verify that the summary description does not appear in the browser
window.