Banner: Allow Banner.Title to be set as <p> - #8275
Open
TylerJDev wants to merge 3 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: 1a54814 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
|
TylerJDev
marked this pull request as ready for review
August 6, 2026 15:15
TylerJDev
requested review from
siddharthkp
and
a lite review from Copilot
and removed request for
Copilot
August 6, 2026 15:15
Contributor
|
🤖 Lint and formatting issues have been automatically fixed and committed to this PR. |
llastflowers
approved these changes
Aug 6, 2026
TylerJDev
had a problem deploying
to
github-pages
August 6, 2026 16:37 — with
GitHub Actions
Failure
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.
Part of https://github.com/github/accessibility-audits/issues/16930
This PR allows
Banner.Titleto be rendered as a paragraph (<p>) in addition to the existing heading levels (h2–h6).In some contexts, a Banner is used where a heading is not appropriate. Rendering the title as a heading in those cases introduces an unnecessary heading into the document structure, which can be disorienting for screen reader users.
Allowing
Banner.Titleto be set as a<p>lets consumers avoid an unnecessary heading level while keeping the visual styling of the title.The default remains
h2, so this is a non-breaking, additive change.Changelog
New
Banner.Titlenow supportsas="p"to render the title as a paragraph instead of a heading.Changed
asprop type forBanner.Titlefrom'h2' | 'h3' | 'h4' | 'h5' | 'h6'to also include'p', and documented the default value of'h2'.Removed
Rollout strategy
Testing & Reviewing
Banner.Titlestill renders as anh2heading by default.Banner.Title as="p"renders a paragraph element (no heading role) — see the added testshould support rendering as a paragraph element.h2–h6) is unchanged.