Skip to content

USWDS-Site - Components: Add captions to Latest updates tables - #3244

Open
AKnassa wants to merge 1 commit into
uswds:mainfrom
AKnassa:rocky/issue-2755-table-captions
Open

USWDS-Site - Components: Add captions to Latest updates tables#3244
AKnassa wants to merge 1 commit into
uswds:mainfrom
AKnassa:rocky/issue-2755-table-captions

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Added a screen-reader-only caption to the shared "Latest updates" table templates, giving the changelog table on every component, pattern, and documentation page an accessible name.

Related issue

Closes #2755

Problem statement

Accessibility checkers (like ANDI) flag the "Latest updates" table on every component page as a "Data Table with No Name." Screen reader users landing on these tables get no announcement of what the table contains. Because the table comes from shared templates, every component page had the same problem.

Solution

Added one <caption class="usa-sr-only">Latest updates for {page title}</caption> line to each of the two shared includes that render these tables (_includes/changelog-table.html and _includes/changelog-table-simple.html). Fixing the two templates fixes all pages at once — the caption now renders on 165 built pages.

The caption is screen-reader-only (rather than the visible caption suggested in the issue) because a visible one would duplicate the "Latest updates" heading that already sits directly above the table. The usa-sr-only approach matches the site's existing pattern in other includes. The caption text is specific per page (for example, "Latest updates for Accordion").

Testing and review

  • The site builds cleanly; rendered pages (Accordion, Banner, Migration) show the caption as the first child of the table.
  • bundle exec rspec passes (10 examples, 0 failures).
  • To review: run ANDI (or any accessibility checker) on any component page's "Latest updates" table — the "Data Table with No Name" flag is resolved.

Add a screen-reader-only <caption> to the shared changelog table
includes so every component, pattern, and documentation page's
"Latest updates" table has an accessible name (ANDI: "Data Table
with No Name"). Fixes uswds#2755.
@AKnassa
AKnassa marked this pull request as ready for review July 16, 2026 19:36
@chandracarney chandracarney added the Affects: Accessibility 🟡 Relates to the accessibility of our components label Jul 24, 2026
@chandracarney chandracarney moved this from Triage to Initial Fed Review in USWDS Core Project Data Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects: Accessibility 🟡 Relates to the accessibility of our components

Projects

Status: Initial Fed Review

Development

Successfully merging this pull request may close these issues.

USWDS-Site - Bug: "Latest update" tables need associated captions on all component pages

2 participants