Rule ID: ace-table-unique-name

Detect tables where the caption text duplicates the summary attribute content

Blind Deafblind Best Practice

What This Rule Checks

When creating tables, it’s important that the <caption> element, which is visible to all users, and the summary attribute, which is only accessible to screen readers, do not contain identical content. The caption serves as an on-screen title, while the summary provides additional context about the table structure for screen reader users.

Who Is Affected

This issue primarily affects: Blind users, who rely entirely on screen readers or braille displays to navigate and interact with content; Deafblind users, who rely on braille displays and cannot access visual or auditory content.

Why This Matters

Duplicate naming causes screen readers to announce the same information twice, wasting the user’s time. The caption should name the table; any description should provide additional context not already in the caption.

How to Fix

Ensure that the content in the summary attribute and the <caption> element are different and complement each other. This approach allows screen reader users to understand both the purpose of the table and its structure without redundancy.

Use the <caption>: Provide a concise, visible title for the table that describes its content.

Use the summary attribute: Offer additional context for screen readers, describing the table’s structure or navigation tips.

Code Examples

Incorrect Markup Solutions:
Code example
<!-- Caption duplicates summary --> <table summary="Quarterly revenue by region"> <caption>Quarterly revenue by region</caption> ... </table> Copy
Correct Markup Solutions:
Code example
<!-- Caption and summary serve different purposes --> <table aria-describedby="table-desc"> <caption>Q3 2025 Revenue by Region</caption> ... </table> <p id="table-desc"> This table shows revenue in millions of USD across four regions. </p> Copy

Common Mistakes to Avoid

  • Copying the same text into both caption and summary or aria-describedby.
  • Not understanding the difference between a table’s name (caption) and its description.

Tip: Data tables must use proper markup so screen readers can associate data cells with their headers. Without this association, table data becomes an incomprehensible list of values without context.