USWDS-Site - Components: Add captions to Latest updates tables - #3244
Open
AKnassa wants to merge 1 commit into
Open
USWDS-Site - Components: Add captions to Latest updates tables#3244AKnassa wants to merge 1 commit into
AKnassa wants to merge 1 commit into
Conversation
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
marked this pull request as ready for review
July 16, 2026 19:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.htmland_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-onlyapproach 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
bundle exec rspecpasses (10 examples, 0 failures).