-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: Making the hidden input on Radio only cover the indicator and not also the label #25025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t also the label.
📊 Bundle size report
Unchanged fixtures
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d7708a2:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 259506702ec479f4fd9d7b848061dcae1354e168 (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1307 | 1333 | 5000 | |
| Button | mount | 956 | 954 | 5000 | |
| FluentProvider | mount | 1574 | 1593 | 5000 | |
| FluentProviderWithTheme | mount | 640 | 644 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 591 | 594 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 631 | 636 | 10 | |
| MakeStyles | mount | 1743 | 1896 | 50000 | |
| SpinButton | mount | 2436 | 2512 | 5000 |
behowell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'd also need to add the pointer cursor to the label right?
':enabled': {
cursor: 'pointer',
+ [`& ~ .${radioClassNames.label}`]: {
+ cursor: 'pointer',
+ },
},
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts
Show resolved
Hide resolved
…t also the label (microsoft#25025) * fix: Making the hidden input on Radio only cover the indicator and not also the label. * Updating to latest patterns. * Adding change file. * Addressing PR feedback * Addressing PR feedback. Co-authored-by: KHMakoto <[email protected]>
…t also the label (microsoft#25025) * fix: Making the hidden input on Radio only cover the indicator and not also the label. * Updating to latest patterns. * Adding change file. * Addressing PR feedback * Addressing PR feedback. Co-authored-by: KHMakoto <[email protected]>

Current Behavior
The hidden input in the
Radiocomponent covers both the indicator and the label, making any interactive elements within the label, like links, impossible to be clicked.We also noticed that when hovering over the label of disabled
Switches, it still showedcursor: pointerstyles.Input
Label
New Behavior
The hidden input in the
Radiocomponent now covers only the indicator and its surrounding space, not the label. This makes any interactive elements within the label, like links, possible to be clicked. We verified that clicking on the label still toggles the state of the component. We also expanded the size of the label so it covers the empty space around it that was previously being covered by the hidden input.Hovering over the label of disabled
Switchesnow showscursor: defaultinstead ofcursor: pointer.Input
Label
Related Issue(s)
Fixes #25021