From df2aa970918d3913e7f66d13c8bef4b1633bb542 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 163b7d5277..376e9afa59 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 8ca79a1adb..9ebeb212cb 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, }),