Skip to content

Commit

Permalink
feat: enable keyboard navigation (#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPidkostelnyi authored Jul 19, 2023
1 parent 8fbc955 commit d21af58
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/SideMenu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ 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} role="menuitem">
<MenuItemLi
tabIndex={0}
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 Expand Up @@ -96,7 +102,7 @@ export const OperationMenuItemContent = observer((props: OperationMenuItemConten
) : (
<OperationBadge type={item.httpVerb}>{shortenHTTPVerb(item.httpVerb)}</OperationBadge>
)}
<MenuItemTitle width="calc(100% - 38px)">
<MenuItemTitle tabIndex={0} width="calc(100% - 38px)">
{item.sidebarLabel}
{props.children}
</MenuItemTitle>
Expand Down

0 comments on commit d21af58

Please sign in to comment.