Skip to content

SegmentedControl: remove the wrong aria-label in storybook#7603

Open
liuliu-dev wants to merge 1 commit intomainfrom
liuliu/segmentedcontrol-storybook-aria-label-fix
Open

SegmentedControl: remove the wrong aria-label in storybook#7603
liuliu-dev wants to merge 1 commit intomainfrom
liuliu/segmentedcontrol-storybook-aria-label-fix

Conversation

@liuliu-dev
Copy link
Contributor

Related issue: https://github.com/github/accessibility-audits/issues/14898

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

@liuliu-dev liuliu-dev added the skip changeset This change does not need a changelog label Feb 26, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2026

⚠️ No Changeset found

Latest commit: b9366c1

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

@liuliu-dev liuliu-dev added the integration-tests: skipped manually Changes in this PR do not require an integration test label Feb 26, 2026
@liuliu-dev liuliu-dev marked this pull request as ready for review February 26, 2026 19:33
@liuliu-dev liuliu-dev requested a review from a team as a code owner February 26, 2026 19:33
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

Updates the SegmentedControl Storybook feature story to avoid overriding the buttons’ accessible names with redundant aria-labels, aligning the example with expected accessibility behavior (notably for counter labels) and addressing the referenced audit issue.

Changes:

  • Removed per-button aria-label props from the “WithCounterLabels” SegmentedControl story.
  • Simplified the JSX for the counter-label buttons to rely on visible text (and CounterLabel’s screen-reader text) for accessible naming.

@liuliu-dev liuliu-dev enabled auto-merge February 27, 2026 16:33
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 skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants