Skip to content

Commit

Permalink
fix(menu-item): allow setting role attribute`
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner committed Dec 11, 2024
1 parent edc85bd commit a06bd80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/components/menu/menuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const MenuItem = forwardRef(function MenuItem(
return (
<Selectable
data-ui="MenuItem"
role="menuitem"
{...restProps}
aria-pressed={as === 'button' && pressed}
data-pressed={as !== 'button' && pressed ? '' : undefined}
Expand All @@ -133,7 +134,6 @@ export const MenuItem = forwardRef(function MenuItem(
onMouseEnter={onItemMouseEnter}
onMouseLeave={onItemMouseLeave}
ref={setRef}
role="menuitem"
tabIndex={-1}
type={as === 'button' ? 'button' : undefined}
>
Expand Down

0 comments on commit a06bd80

Please sign in to comment.