XHTML Basics: Accessibility for tables; captions and summaries
If you want to create great tables that are understandable in alternative browsers, such as text-only and voice browsers, you’ll want to include table headers. Our accessibility tweaks don’t stop there though. Two more elements that will make your tables more usable and informative are captions and summaries.
A caption is a visible quick-take of your table and should always be the first element in your table markup.
<table>
<caption>Top threats to consumer security.</caption>
...
</table>
Your table will look something like this with the added caption:
Risk assessment of consumer threats and Internet safety.
| Article link |
Internet safety threat | Risk factor |
| Phishing dangers | Phishing, identity theft | 82% |
| Antivirus software | Viruses protection | 76% |
To provide a little more information to those alternative browsers we can include the summary attribute. This attribute just gives a little more information about the data in the table and will not be displayed in browsers such as Internet Explorer and Firefox.
<table summary="Results of a web developer survey assessing consumers risks and Internet safety.">
<caption>Risk assessment of consumer threats and Internet safety.</caption>
...
</table>









