docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.47k stars 5.67k forks source link

Accessibility - hidden anchors are still tabbable #2225

Closed kburk1997 closed 10 months ago

kburk1997 commented 1 year ago

Bug Report

Steps to reproduce

  1. Go to develop preview
  2. Press Tab key to move to next focusable element on the page
  3. Repeat step 2 until "Edit document" link is focused

    Current behaviour

    Sidebar items remain in the tab order regardless of whether the menu is open or closed. Screen recording with keystrokes:

https://github.com/docsifyjs/docsify/assets/11298269/1431c518-df88-4776-8d2e-a56b553f583f

Expected behaviour

Hidden sidebar items are not tabbable when closed. Sidebar items are tabbable when the sidebar is open.

Other relevant information

jhildenbiddle commented 11 months ago

Thanks for creating the issue, @kburk1997!

I've created a draft PR here: #2265. In that PR you will find a preview link which will allow you to review the changes:

CleanShot 2023-10-17 at 08 59 27@2x

Before I mark this PR as ready for review by the maintainers, I would love to get your thoughts and/or feedback.

Thanks!