Repository navigation
Conversation
Add an accessibility bullet clarifying that the h4 in the Alert examples is not required - any heading level (h1-h6) appropriate to the page outline works with the usa-alert__heading class. Includes a component-alert changelog entry. Fixes uswds#2086.
Backfill githubPr for the semantic heading guidance entry (uswds#3246).
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 accessibility guidance to the Alert component clarifying that any semantic heading level (h1–h6) can be used in an alert — not just the h4 shown in the examples.
Related issue
Closes #2086
Problem statement
The Alert examples all use an
<h4>for the alert heading, and nothing on the page said this was just an example. Implementers could reasonably conclude the h4 is required, leading them to break their page's heading order — a real accessibility problem for screen reader users who navigate by headings.Solution
Added one bullet to the Alert component's accessibility guidance, using the wording drafted in the issue: use the heading level appropriate to your page's structure; as long as the heading uses the
usa-alert__headingclass, it will look the same whether it's an h1 or an h6. Also added a changelog entry to the Alert component's "Latest updates" (dated with this change; the PR number field can be backfilled with this PR's number).Testing and review
bundle exec rspecpasses (10 examples, 0 failures).