-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: The navItems are not clickable with vimium (accessibility) #545
base: master
Are you sure you want to change the base?
Conversation
84a06e5
to
09a98cb
Compare
src/components/nav-bar/nav-bar.tsx
Outdated
@@ -36,7 +36,7 @@ export const NavBar: React.FunctionComponent<NavBarProps> = (props: NavBarProps, | |||
{(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) })} | |||
onClick={() => context.router.history.push(item.path)}> | |||
onClick={() => context.router.history.push(item.path)} role="checkbox"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- At the moment, the navItems do not show up as links, because they do not contain a typical
<a href>
why not use an actual <Link>
component here? Same as #222 (comment), that would resolve #166 as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a few variations with a <Link>
component but I don't know how to make this work. (I have little experience with web development). However, I think that it is a Tooltip-thing. If you look at other Tooltip examples, they have the same issue. Like here, https://react-tooltip.com/docs/getting-started, the Tooltip buttons are clickable but do not show up as real links.
where @michaelfresco |
b63f891
to
a3b2209
Compare
Hi @tooptoop4, and @agilgur5, A link like this also works:
(I verified this with a locally built Argo Workflows image) |
be194b1
to
c7f0e2f
Compare
Signed-off-by: Michael Fresco <15065392+michaelfresco@users.noreply.github.com>
c7f0e2f
to
a38c306
Compare
@crenshaw-dev 📦 pls |
Motivation
This PR adds a tag
role="checkbox"
to the navItems. This has the benefit that keyboard users can use vimium to navigate the user interface. At the moment, the navItems do not show up as links, because they do not contain a typical<a href>
Adding
role="checkbox"
works around that issue, and makes them clickablePlease also see the original issue: The navItems are not clickable with vimium (accessibility) argo-workflows#12813