Skip to content
SilktideHelp

Identical table summary and caption

Silktide checks tables that have both a summary attribute and a caption, and reports the ones where the two say exactly the same thing. Each serves a different purpose, so duplicating one into the other only creates repetition.

In , the <caption> element is the table's visible title, while the summary attribute is an invisible description intended to explain the table's structure to users.

<!-- Problem: the summary just repeats the caption -->
<table summary="Opening hours">
  <caption>Opening hours</caption>
  ...
</table>

Why this matters

Screen readers announce both the caption and the summary when the listener reaches a table. When they are identical, the same text is read twice, which wastes the listener's time and suggests the summary was filled in to tick a box rather than to help. A useful summary adds something the caption doesn't: how the table is organized, or how best to read it.

How to fix it

  1. Either remove the summary attribute and keep the caption, or
  2. Rewrite the summary so it complements the caption by describing the table's structure:
<!-- Fixed: the summary adds structural information -->
<table summary="Days in the first column, morning and afternoon hours in the second and third">
  <caption>Opening hours</caption>
  ...
</table>

Note that the summary attribute comes from HTML 4 and is obsolete in current HTML, so removing it is often the better long-term choice. A visible paragraph before the table can carry the same explanation for everyone.

How Silktide tests this

  1. Find every table on each page.
  2. Skip tables marked as presentational with role="presentation".
  3. Skip tables without a summary attribute or without a <caption>.
  4. Compare the two texts, ignoring case and extra whitespace, and report the table if they are identical.

Learn more

Last updated

Was this page helpful?