Skip to content

Commit

Permalink
remove hack for menu container role
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Oct 9, 2023
1 parent 87c2ac8 commit bbc1f49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,8 @@ export const Menu: React.FC<MenuProps> = ({
});

React.useEffect(() => {
menu?.setAttribute('role', 'menu');
target?.setAttribute('aria-expanded', String(isMenuOpen));
}, [menu, target, isMenuOpen]);
}, [target, isMenuOpen]);

return (
<div {...getPrefixedDataAttributes(dataAttributes, 'Menu')}>
Expand Down Expand Up @@ -438,6 +437,7 @@ export const Menu: React.FC<MenuProps> = ({
: {}),
}),
}}
role="menu"
>
<MenuContext.Provider
value={{
Expand Down

0 comments on commit bbc1f49

Please sign in to comment.