react-radio: remove required indicator from label#22782
Merged
spmonahan merged 1 commit intomicrosoft:masterfrom May 3, 2022
Merged
react-radio: remove required indicator from label#22782spmonahan merged 1 commit intomicrosoft:masterfrom
spmonahan merged 1 commit intomicrosoft:masterfrom
Conversation
Prior to this change when a Radio was marked as "required" a red asterisk was shown on the Radio's label to visually indicate it was required. This change no longer passes the `required` prop to the Label subcomponent so this visual indicator is not shown. The Radio input is still marked with the `required` attribute so it continues to be semantically required. As Radio is intended to be used inside a RadioGroup which should have a label for the entire group the Label for the group should disply the required indicator. The required indicator can still be shown on the Label by passing the `required` prop to the `label` slot via shorthand.
|
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 d3ea67d:
|
Collaborator
📊 Bundle size report
Unchanged fixtures
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1197 | 1189 | 5000 | |
| Button | mount | 756 | 698 | 5000 | |
| FluentProvider | mount | 2323 | 2364 | 5000 | |
| FluentProviderWithTheme | mount | 395 | 375 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 344 | 323 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 407 | 417 | 10 | |
| MakeStyles | mount | 1878 | 1877 | 50000 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 78337857af5757efd278ac8e96ced4e15e878a52 (build) |
smhigley
approved these changes
May 3, 2022
marwan38
pushed a commit
to marwan38/fluentui
that referenced
this pull request
Jun 13, 2022
Prior to this change when a Radio was marked as "required" a red asterisk was shown on the Radio's label to visually indicate it was required. This change no longer passes the `required` prop to the Label subcomponent so this visual indicator is not shown. The Radio input is still marked with the `required` attribute so it continues to be semantically required. As Radio is intended to be used inside a RadioGroup which should have a label for the entire group the Label for the group should disply the required indicator. The required indicator can still be shown on the Label by passing the `required` prop to the `label` slot via shorthand.
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.

Current Behavior
Radios inside a requiredRadioGroupeach display a red "required asterisk" after each of their labels. This means users see a required asterisk for the RadioGroup label and for each of the Radios.New Behavior
Radiolabels do not show the visual required asterisk. They continue to mark theinputelement asrequiredBefore
After
Related Issue(s)
Fixes #22770