Skip to content

feat(codemod): add RadioGroup aria-label → label codemod for v0.3.0 - #4683

Merged
cixzhang merged 1 commit into
mainfrom
feat/codemod-radiogroup-label
Aug 4, 2026
Merged

feat(codemod): add RadioGroup aria-label → label codemod for v0.3.0#4683
cixzhang merged 1 commit into
mainfrom
feat/codemod-radiogroup-label

Conversation

@cixzhang

@cixzhang cixzhang commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

Adds the missing codemod for the one breaking change in the upcoming v0.3.0 release that did not yet have one: the DropdownMenuRadioGroup aria-label → required label prop rename.

As of v0.3.0, DropdownMenuRadioGroup (and its re-exports ContextMenuRadioGroup and BreadcrumbMenuRadioGroup) take a required label prop that names the group for assistive tech — replacing the previous optional aria-label/aria-labelledby passthrough. label is applied as the group's aria-label.

Migration

rename-radiogroup-arialabel-to-label renames the aria-label JSX attribute to label on those three components, so astryx upgrade migrates consumers automatically.

  • Component-scoped and import-gated (alias-aware): only elements that resolve to one of the three RadioGroup components are touched. An aria-label on any other element is left alone.
  • aria-labelledby is intentionally left untouched. When a visible label already exists on the page, consumers keep passing aria-labelledby through base props rather than moving to label.

Why this PR

The other two breaking changes this cycle (the authoring consolidation/removal) already ship codemods in transforms/v0.3.0/. The RadioGroup prop rename was the only breaking change without one, which the release codemod audit requires before the version bump. Merging this closes that gap so the v0.3.0 version-bump PR can proceed.

Testing

  • Unit tests cover each of the three components, the barrel and subpath import sources, alias-awareness, the aria-labelledby no-op, non-target components, and the no-import no-op.
  • transforms/v0.3.0/ codemod suite: 80 tests passing.
  • Registered in the v0.3.0 transform manifest.

DropdownMenuRadioGroup (and its ContextMenu/Breadcrumb re-exports,
ContextMenuRadioGroup and BreadcrumbMenuRadioGroup) now take a required
`label` prop that names the group for assistive tech, replacing the old
optional `aria-label` passthrough. Add the codemod that renames the
`aria-label` attribute to `label` on those three components so
`astryx upgrade` migrates consumers automatically.

The rename is component-scoped and import-gated (alias-aware): only
elements resolved to one of the three RadioGroup components are touched,
and `aria-labelledby` is intentionally left untouched. Registered in the
v0.3.0 transform manifest with unit tests.
@cixzhang
cixzhang requested a review from josephfarina as a code owner August 3, 2026 16:19
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 3, 2026
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 3, 2026 4:22pm

Request Review

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 3, 2026
@cixzhang
cixzhang merged commit 54f22ca into main Aug 4, 2026
19 checks passed
@github-actions
github-actions Bot deleted the feat/codemod-radiogroup-label branch August 4, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant