Skip to content

Conversation

coder-abdo
Copy link

Update Banner component to use the Banner.Title as the default label for the landmark region #6590
Closes #

Changelog

New

Changed

Removed

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

@coder-abdo coder-abdo requested a review from a team as a code owner August 30, 2025 12:58
@coder-abdo coder-abdo requested a review from siddharthkp August 30, 2025 12:58
Copy link

changeset-bot bot commented Aug 30, 2025

⚠️ No Changeset found

Latest commit: cfae57a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

Requested changes

Feel free to ask any questions or let us know if you'd like to not take this forward!

@@ -132,6 +134,7 @@ export const Banner = React.forwardRef<HTMLElement, BannerProps>(function Banner
<section
{...rest}
aria-label={label ?? labels[variant]}
aria-labelledby={ariaLabelledby ?? title}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the right implementation

Based on #6590, what I gather is:

  1. If the title prop (string value) is passed, use aria-label=<value-of-title-prop>
  2. If instead of title prop, Banner.Title subcomponent is used, use aria-labelledby=<id-for-the-banner-title> (Note: aria-labelledby takes an id of an element, not a string value)
  3. If either of aria-label or aria-labelledby are passed as props, ignore both 1 and 2 and use those directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants