Deepcrawl is now Lumar. Read more.
DeepcrawlはLumarになりました。 詳細はこちら

Table has identical summary and caption (A11y Best Practice Violation)

How to fix the web accessibility issue of tables with identical summary and caption attributes — Lumar Web Accessibility Wiki

Tables - Lumar Accessibility Thumbnail
NULL NULL
 

What does this accessibility issue mean?

Issue summary: Multiple tables on a page have identical summary and caption attributes

Table summaries and captions should be unique to that particular table. 

This is important for website accessibility because it helps ensure that screen reader users can easily identify and distinguish between different tables on a page.

Solution:

If there are multiple tables on a web page, write a unique summary and caption text for each table’s attributes to avoid confusion.

Issue details
  • WCAG Level BP
  • Severity: Minor
  • Category: Tables (BP)
  • Rule ID: table-duplicate-name

Lumar can help you find & resolve this website accessibility issue — & many others — on your own site. Speak to our team to get started with the platform.

Get a Lumar demo
 

Example HTML violation: Table has identical summary and caption (A11y Best Practice Violation)

<table summary="Detailed Sales Report">
  <caption>Detailed Sales Report</caption>
  <tbody>
    <tr>
      <th>Item</th>
      <th>Price</th>
    </tr>
    <tr>
      <td>Item 1</td>
      <td>$10</td>
    </tr>
  </tbody>
</table>

The above HTML violates the table-duplicate-name accessibility rule because it contains multiple tables with the same summary attribute or caption. According to the rule, each summary or caption should be unique.

To fix this issue, you need to provide unique and descriptive names for the summary attribute and caption in your table.

 

How to fix "Table has identical summary and caption (A11y Best Practice Violation)" issue

<table summary="Detailed Sales Report for July 2022">
  <caption>Detailed Sales Report for July 2022</caption>
  <tbody>
    <tr>
      <th>Item</th>
      <th>Price</th>
    </tr>
    <tr>
      <td>Item 1</td>
      <td>$10</td>
    </tr>
  </tbody>
</table>

In this example, I just added more context to the summary and caption ("for July 2022") but you should replace it with whatever makes the most sense for your situation. Remember: - summary attribute provides a text description of the table structure. It is especially useful for people using screen readers.

  • caption element provides a title or summary for the table which can be visually displayed in the browser.
  • Both, should ideally be unique and descriptive.

You may find these resources helpful:

  1. HTML Table Advanced Features and Accessibility - MDN
  2. Web Accessibility Tutorials - W3C WAI
  3. ACT Rules Community Group - Accessibility Rules for Automated Testing

 
Digital Accessibility + SEO + Website Health

Build better online experiences — explore the full Lumar platform