Skip to content

Commit

Permalink
fix(side-navbar): keyboard a11y
Browse files Browse the repository at this point in the history
replace div with button to allow activation using space and enter
  • Loading branch information
gaurav5430 committed May 20, 2022
1 parent 1e23727 commit 14f8b22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/nav-bar/nav-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,9 @@ $nav-break-height-sm: 746px;
.nav-bar__item {
margin: 10px 0;
font-size: 25px;
font-family: inherit;
line-height: 1.5;
display: block;
width: 100%;
}
}
4 changes: 2 additions & 2 deletions src/components/nav-bar/nav-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const NavBar: React.FunctionComponent<NavBarProps> = (props: NavBarProps,
<div className='nav-bar__version'>{props.version && props.version()}</div>
{(props.items || []).map((item) => (
<Tooltip content={item.title} placement='right' arrow={true} key={item.path + item.title}>
<div className={classNames('nav-bar__item', { active: isActiveRoute(locationPath, item.path) })}
<button type="button" className={classNames('nav-bar__item', { active: isActiveRoute(locationPath, item.path) })}
onClick={() => context.router.history.push(item.path)}>
<i className={item.iconClassName}/>
</div>
</button>
</Tooltip>
))}
</div>
Expand Down

0 comments on commit 14f8b22

Please sign in to comment.