From b8f7da6b003ca12c1e2f0f4d42f3dd6d6f86ccac Mon Sep 17 00:00:00 2001 From: Dag Frode Solberg Date: Thu, 29 Dec 2022 15:39:48 +0100 Subject: [PATCH] fix: move role to list item to meet ARIA spec (#2228) --- src/components/SideMenu/MenuItem.tsx | 2 +- src/components/SideMenu/styled.elements.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/SideMenu/MenuItem.tsx b/src/components/SideMenu/MenuItem.tsx index 163b7d52..376e9afa 100644 --- a/src/components/SideMenu/MenuItem.tsx +++ b/src/components/SideMenu/MenuItem.tsx @@ -44,7 +44,7 @@ export class MenuItem extends React.Component { render() { const { item, withoutChildren } = this.props; return ( - + {item.type === 'operation' ? ( ) : ( diff --git a/src/components/SideMenu/styled.elements.ts b/src/components/SideMenu/styled.elements.ts index 8ca79a1a..9ebeb212 100644 --- a/src/components/SideMenu/styled.elements.ts +++ b/src/components/SideMenu/styled.elements.ts @@ -125,7 +125,6 @@ export interface MenuItemLabelType { } export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({ - role: 'menuitem', className: classnames('-depth' + props.depth, { active: props.active, }),