You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've explored a few approaches between making the element focuseable using tabindex but then it still can't be triggered using the keyboard.
The correct solution would be to use the appropriate element for what the Navbar.Link should behave like: renderAs="button"
This fixes basically all usability and accessibility issues, but unfortunately the browser default stylesheet bleeds through and makes the button look very ugly with a white background, border, changed font etc.
So instead of mopping that up with a lot more code i decided to use renderAs="a" with href="#" + event.preventDefault().
This is not ideal though. Optimally react-bulma-components would use a <button> in this case and apply the same styles and suppress the browser default styles.
It would be awesome if this component library can be made more accessible and keyboard friendly :)
The text was updated successfully, but these errors were encountered:
FunctionDJ
changed the title
Navbar.Link > Navbar.Dropdown can't be focused using the keyboard (accessibility issue)
[a11y] Navbar.Link > Navbar.Dropdown can't be focused using the keyboard
Apr 14, 2022
Describe the bug
Title pretty much says it all. The
Navbar.Dropdown
component doesn't contain a<a>
so it's not focuseable.See official component viewer: https://couds.github.io/react-bulma-components/?path=/story/components-navbar--default
I've explored a few approaches between making the element focuseable using tabindex but then it still can't be triggered using the keyboard.
The correct solution would be to use the appropriate element for what the
Navbar.Link
should behave like:renderAs="button"
This fixes basically all usability and accessibility issues, but unfortunately the browser default stylesheet bleeds through and makes the button look very ugly with a white background, border, changed font etc.
So instead of mopping that up with a lot more code i decided to use
renderAs="a"
withhref="#"
+event.preventDefault()
.This is not ideal though. Optimally react-bulma-components would use a
<button>
in this case and apply the same styles and suppress the browser default styles.It would be awesome if this component library can be made more accessible and keyboard friendly :)
The text was updated successfully, but these errors were encountered: