diff --git a/src/menu.tsx b/src/menu.tsx index a51139d372..7406628c9f 100644 --- a/src/menu.tsx +++ b/src/menu.tsx @@ -372,6 +372,13 @@ export const Menu: React.FC = ({ }; }); + React.useEffect(() => { + if (target) { + target.setAttribute('role', 'menu'); + target.setAttribute('aria-expanded', String(isMenuOpen)); + } + }, [target, isMenuOpen]); + return (
{renderTarget({...targetProps, isMenuOpen})}