-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality
Description
Noticed while reviewing #13059
The FeatureToggle component renders a label
HTML attribute, which is invalid HTML. Seems to me the label
prop should only be used as children and not passed as a prop to MenuItem:
gutenberg/packages/edit-post/src/components/header/feature-toggle/index.js
Lines 23 to 33 in 0f18024
return ( | |
<MenuItem | |
icon={ isActive && 'yes' } | |
isSelected={ isActive } | |
onClick={ flow( onToggle, speakMessage ) } | |
role="menuitemcheckbox" | |
label={ label } | |
info={ info } | |
> | |
{ label } | |
</MenuItem> |
otherwise, it gets rendered as an HTML attribute (which doesn't do anything other than invalidating the HTML):
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality