Skip to content

Commit f9954b0

Browse files
authored
fix(menuitem): fix title inheritance, move to li (#20378)
* fix(menuitem): fix title inheritance, move to li * chore: remove test story
1 parent 32a5e41 commit f9954b0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react/src/components/Menu/MenuItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,15 @@ export const MenuItem = forwardRef<HTMLLIElement, MenuItemProps>(
262262
onClick={handleClick}
263263
onKeyDown={handleKeyDown}
264264
onKeyUp={handleKeyUp}
265+
title={label}
265266
{...getReferenceProps()}>
266267
<div className={`${prefix}--menu-item__selection-icon`}>
267268
{rest['aria-checked'] && <Checkmark />}
268269
</div>
269270
<div className={`${prefix}--menu-item__icon`}>
270271
{IconElement && <IconElement />}
271272
</div>
272-
<Text
273-
as="div"
274-
className={`${prefix}--menu-item__label`}
275-
title={label}>
273+
<Text as="div" className={`${prefix}--menu-item__label`}>
276274
{label}
277275
</Text>
278276
{shortcut && !hasChildren && (

0 commit comments

Comments
 (0)