simplebar icon indicating copy to clipboard operation
simplebar copied to clipboard

Focus not visible

Open meldafert opened this issue 1 year ago • 2 comments

Describe the bug When navigating content with the keyboard with the TAB key, all elements receiving focus should indicate this eg. by showing a visible focus ring. Since https://github.com/Grsmto/simplebar/pull/587, the scrollable area can be focused with the keyboard, however it does not have a visible focus indicator.

To Reproduce Steps to reproduce the behavior:

  1. Go to the Demo page
  2. Use the TAB key (and SHIFT+TAB) to navigate around the page
  3. See that the buttons receive a dotted outline when receiving focus
  4. See that whenever the scrollable container is focus, the focus indicator seemingly vanishes

Expected behavior It should always be visible which element has focus. When the scrollable container has focus, it should have a visible indicator.

Additional context WCAG Success Criterion 2.4.7

Your environment

Software Version(s)
SimpleBar 6.2.5
Browser Firefox 121
npm/Yarn N/A
Operating System Linux

meldafert avatar Jan 02 '24 19:01 meldafert

Is it actually desired to show a focus ring around a scrollable area?

What happens natively?

kalnode avatar Apr 17 '24 19:04 kalnode

If it is focusable, it should have a focus ring. Firefox, which is the only browser currently to make scrollable areas focusable like default (like simplebar does), does show a focus ring when focusing via keyboard. See this article for more background on the accessibility issues.

meldafert avatar Apr 18 '24 08:04 meldafert