Visitar URL original
USWDS-Site - Alert: Add semantic heading guidance by AKnassa · Pull Request #3246 · uswds/uswds-site · GitHub
Skip to content

USWDS-Site - Alert: Add semantic heading guidance - #3246

Open
AKnassa wants to merge 2 commits into
uswds:mainfrom
AKnassa:rocky/issue-2086-alert-headings
Open

AKnassa wants to merge 2 commits into
uswds:mainfrom
AKnassa:rocky/issue-2086-alert-headings

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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__heading class, 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

  • The site builds cleanly; the rendered Alert page shows the new bullet between the existing accessibility bullets, and the new changelog row renders at the top of "Latest updates."
  • bundle exec rspec passes (10 examples, 0 failures).
  • To review: check the Accessibility section of the Alert component page.

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
AKnassa marked this pull request as ready for review July 16, 2026 19:36
@chandracarney chandracarney added the Affects: Accessibility 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score. 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 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score.

Projects

No open projects
Status: Initial fed review

Development

Successfully merging this pull request may close these issues.

USWDS - Feature: Alert component guidance on semantic headings

2 participants