Skip to content
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

A11y: Keyboard navigation not possible on a section tabs #2338

Open
2 tasks done
mquandalle opened this issue Oct 14, 2022 · 7 comments · Fixed by #2526
Open
2 tasks done

A11y: Keyboard navigation not possible on a section tabs #2338

mquandalle opened this issue Oct 14, 2022 · 7 comments · Fixed by #2526

Comments

@mquandalle
Copy link

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

Using official Plausible Cloud hosting or self-hosting?

Plausible Cloud from plausible.io

Describe the bug

I'm using Vimium to browse the web, which has a feature to associate a keyboard shortcut to every links present on the page.

It works for most links but not for a section tabs, exemple “map, countries, regions, cities” in the “Regions” section.

Expected behavior

vimium can detect that tabs are a clickable element

Screenshots

Capture d’écran du 2022-10-14 12-03-17

Environment

- OS: Linux
- Browser: Firefox with Vimium
@metmarkosaric
Copy link
Contributor

metmarkosaric commented Oct 14, 2022

thanks for reporting @mquandalle! this sounds more like a feature request rather than a bug. we keep the issues tab for actual bugs with our product only. feature requests we keep in this forum instead as there it's easier for our developer to have an overview and decide what to work on next

@mquandalle
Copy link
Author

I was mentioning Vimium because that's what I am using, but it is actually an accessibility bug: the tabs are simple <li> elements without an appropriate aria-role to make them usable without a mouse. (Feel free to convert this issue into a discussion if you prefer to view this matter as a feature request)

@mquandalle mquandalle changed the title Keyboard navigation not possible on a section tabs A11y: Keyboard navigation not possible on a section tabs Oct 14, 2022
@metmarkosaric
Copy link
Contributor

cool, thanks for the explanation! we'll keep it as a bug in that case and our developers will hopefully be able to fix it. thanks again for reporting!

@djanda97
Copy link
Contributor

Hello, I did a bit of research regarding how different HTML elements handle keyboard accessibility.

It is possible to add keyboard navigation to the existing li elements, but that would require adding the tabindex attribute, along with defining event handlers for the ENTER or SPACE keys to allow for the elements to be selectable.

From MDN, I discovered that button elements provide built-in keyboard accessibility features including:

  • Ability to use the TAB key for navigating between buttons
  • Ability to select buttons by pressing the ENTER or SPACE keys

Replacing the li elements with button elements seems like an enticing option considering the included accessibility features. I tested this locally on Firefox and it looks to be working fine, will be opening a PR soon and would like to get your feedback.

@mquandalle @metmarkosaric

@mquandalle
Copy link
Author

Some focusable elements miss a visual indication that there are focused.

plausible keyboard nav

Using keyboard navigation we see an outline border on elements of the list but not “campagins” button. This element is still focused and pressing Enter opens it, but it should have a border when it is the focused element.

@mquandalle
Copy link
Author

Also the top “user” menu is still not focusable.

menu not focuasable

@metmarkosaric metmarkosaric reopened this Apr 18, 2023
@metmarkosaric
Copy link
Contributor

thanks @mquandalle! i've reopened the thread so we can take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants