Skip to content

fix(checkbox): hide bubble input with native hidden attribute#3972

Open
fayonation wants to merge 1 commit into
radix-ui:mainfrom
fayonation:fix/checkbox-bubble-input-a11y-3167
Open

fix(checkbox): hide bubble input with native hidden attribute#3972
fayonation wants to merge 1 commit into
radix-ui:mainfrom
fayonation:fix/checkbox-bubble-input-a11y-3167

Conversation

@fayonation

Copy link
Copy Markdown

Summary

Fixes #3167

Problem

Wave flags "Missing form label" on the auto-generated bubble <input> used for native form integration. The input was hidden with aria-hidden="true" while still being focusable (tabIndex={-1}), which confuses accessibility scanners even when the visible checkbox button is correctly labelled.

Solution

Use the native hidden attribute instead, which removes the bubble input from the accessibility tree without the aria-hidden + focusable conflict. Label association is mirrored from the control for scanners that still inspect hidden inputs.

Test plan

  • pnpm vitest run packages/react/checkbox/src/checkbox.test.tsx — 27/27 pass
  • @radix-ui/react-checkbox typecheck passes
  • Storybook Legacy Within Form — bubble inputs have hidden: true, form toggle works
  • CI passes on PR

Made with Cursor

Replace aria-hidden on the form bubble input with the native hidden
attribute and mirror label association from the control button. Fixes
Wave "Missing form label" false positives reported in radix-ui#3167.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ddf77c3

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

This PR includes changesets to release 2 packages
Name Type
@radix-ui/react-checkbox Patch
radix-ui 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

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.

Accessibility issue reported by Wave on Checkbox auto-generated input tag

1 participant