Skip to content

Commit

Permalink
fix: move role to list item to meet ARIA spec (#2228)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagfs authored Dec 29, 2022
1 parent f6a70b1 commit b8f7da6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SideMenu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
render() {
const { item, withoutChildren } = this.props;
return (
<MenuItemLi onClick={this.activate} depth={item.depth} data-item-id={item.id}>
<MenuItemLi onClick={this.activate} depth={item.depth} data-item-id={item.id} role="menuitem">
{item.type === 'operation' ? (
<OperationMenuItemContent {...this.props} item={item as OperationModel} />
) : (
Expand Down
1 change: 0 additions & 1 deletion src/components/SideMenu/styled.elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
Expand Down

0 comments on commit b8f7da6

Please sign in to comment.