docsifyjs / docsify

🃏 A magical documentation site generator.

Home Page:https://docsify.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accessibility - current page in sidebar should have aria-current="page"

kburk1997 opened this issue · comments

Feature request

Problem or desire

Currently, screen readers such as VoiceOver, JAWS, or NVDA cannot differentiate between selected and non-selected links.

Proposal

Use aria-current="page" on the selected link, and leave non-selected links as-is

Implementation

DOM tree:
Screenshot of DOM tree with active link highlighted. Active link has aria-current="page"

VoiceOver screen recordings:

Without aria-current:

Screen.Recording.2023-09-12.at.11.43.55.AM.mov

With aria-current:

Screen.Recording.2023-09-12.at.11.37.30.AM.mov

Reference: MDN - aria-current

Thanks for creating the issue, @kburk1997!

I've created a draft PR here: #2254. 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!