Skip to content

PageHeader semantic heading fix#7527

Merged
llastflowers merged 2 commits intomainfrom
llastflowers/14987/PageHeader-story-semantic-heading-fix
Feb 12, 2026
Merged

PageHeader semantic heading fix#7527
llastflowers merged 2 commits intomainfrom
llastflowers/14987/PageHeader-story-semantic-heading-fix

Conversation

@llastflowers
Copy link
Contributor

@llastflowers llastflowers commented Feb 11, 2026

Addresses https://github.com/github/accessibility-audits/issues/14987

Changelog

Changed

Change <Text> to <Heading> so that element is rendered as h2 instead of span.

Before / After:

tag before tag after

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copilot AI review requested due to automatic review settings February 11, 2026 17:40
@llastflowers llastflowers requested a review from a team as a code owner February 11, 2026 17:40
@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: 8f67fd1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an accessibility audit issue by replacing <Text> components with <Heading as="h2"> components for sidebar section headings in the PageHeader examples. This ensures proper semantic HTML structure, rendering these labels as <h2> elements instead of <span> elements, which improves screen reader support and maintains proper heading hierarchy.

Changes:

  • Updated "Assignees" and "Labels" section headings in the WithPageLayout story to use semantic <Heading as="h2"> elements instead of <Text> elements

@primer primer deleted a comment from github-actions bot Feb 11, 2026
@llastflowers
Copy link
Contributor Author

integration tests skipped manually: storybook-only changes in this PR

Copy link
Contributor

@hectahertz hectahertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@llastflowers llastflowers added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit c87db98 Feb 12, 2026
56 checks passed
@llastflowers llastflowers deleted the llastflowers/14987/PageHeader-story-semantic-heading-fix branch February 12, 2026 18:59
@primer primer bot mentioned this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants