Repository navigation
Conversation
Contributor
Author
|
Updated in
Readings on 2026-11-30,
|
l4u532
force-pushed
the
fix/form-control-attributes
branch
6 times, most recently
from
December 2, 2026 20:44
f064c41 to
c59c137
Compare
l4u532
force-pushed
the
fix/form-control-attributes
branch
from
December 4, 2026 14:46
c59c137 to
35f7203
Compare
This branch has not been deployed
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.
tl;dr
ariaLabel.Reproduction
Render a switch beside
<label htmlFor="updates">Email updates</label>and passid="updates"to Switch. Clicking the label now toggles the switch. A Select trigger accepts the same label pattern. Clicking its label twice opens and then closes the listbox.Before and after
The same label presses leave the switch off and the listbox closed on the left. On the right, the switch turns on and the listbox opens. Captured 2026-11-29 against
c0944430andaeb528cc.Implementation
RadioGroupItem,Switch,Checkbox, andSelectTriggerforward attributes to their buttons. The components still own their state attributes and activation handlers. Radio keyboard navigation is unchanged. An empty ID uses the generated ID.For Radio and Checkbox,
aria-labelledbytakes precedence overaria-labeland the built-in name.aria-describedbyadds external text alongside the built-in description. For Switch,aria-labeltakes precedence overariaLabel. For Select, include the visible value or placeholder in an explicit accessible name.Select uses the mounted trigger ID for listbox labelling, placement, and focus return. Dismissal treats the linked label as part of the trigger interaction. The 14 docs pages that ship the changed files have refreshed dates.
Browser results
Measured on 2026-11-29 with Playwright, Chrome DevTools, SafariDriver, and iPad Safari on iPadOS 26.5. The before and after fixtures compare attribute forwarding and external label activation.
noneover 21 sampled frames.The local code review also found that an external native label picked up the built-in description. Chrome and iPad Safari confirmed the corrected names now contain only the label text. Chrome confirmed that a second press on a Select label keeps the list open until activation, then closes it once.
Chrome also checked Switch naming precedence, absent and empty attributes, controlled values, and Checkbox mixed state. It exercised approval choices, signup, scheduler controls, table selection, Card, Bookshelf, Wheel Picker, Crash, and Slide.
Test plan
bun run checkandbun test. The accessibility suite has 243 passing tests.id,aria-invalid, ordata-testidand inspect the button. The attributes appear on the same element as the control state.