Table Summaries

You can summarize the content of your table using the summary attribute within the table element:

<table summary="text description">

If you're thinking “Hey, I bet this has something to do with accessibility,” you're spot-on. Providing summaries does, in fact, assist people with disabilities who require more contextual information about the table.

Summaries won't appear onscreen, unlike alternative text or the title attribute used in links, which include the information as a ToolTip as the mouse passes over the table. In the case of summaries, they are read only by the assistive device, such as a screen reader for a blind user.

Example 4-8 shows the table so far, with a summary added.

Example 4-8. Adding a table summary ...

Get Spring Into HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.