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

[Issue #494] New config option skipLink for accessibility #495

Closed
wants to merge 2 commits into from
Closed

[Issue #494] New config option skipLink for accessibility #495

wants to merge 2 commits into from

Conversation

dmed256
Copy link

@dmed256 dmed256 commented May 19, 2018

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you are merging your commits to master branch.
  • Add some descriptions and refer relative issues for you PR.
  • DO NOT include files inside lib directory.

@dmed256 dmed256 changed the title [Issue #494] New config option addSkipLink for accessibility [Issue #494] New config option skipLink for accessibility May 19, 2018
@dmed256
Copy link
Author

dmed256 commented May 20, 2018

We might need to add an onclick event to properly focus on #main

@@ -251,6 +258,15 @@ export function initRender(vm) {
dom.before(navAppendToTarget, navEl)
}

if (config.skipLink
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding this to <body></body> but <nav> was always added first

@QingWei-Li
Copy link
Member

I think this should be a plugin.

@dmed256
Copy link
Author

dmed256 commented May 21, 2018

Ok, I'll split it as a plugin
Should it be outside of docsify as well?

@QingWei-Li
Copy link
Member

Yes.

@trusktr
Copy link
Member

trusktr commented Jun 21, 2020

I think accessibility should be in core, right? Isn't what the site "looks" like important, not just for people with eyes? @jhildenbiddle wdyt?

@jhildenbiddle
Copy link
Member

jhildenbiddle commented Jun 21, 2020

@trusktr --

Accessibility should absolutely be a concern for the core team, and we can and should do better moving forward. See #494 (comment) for related feedback.

I'm guessing that the above recommendation was made based on the assumption that adding a skip link meant that the link would be visible on all sites and, since many people may not want that, users could "opt-in" by either installing the plugin or not. Again, just a guess. Fortunately, this isn't the case. We can add a "Skip Navigation" link to the top of the sidebar that is hidden by default but becomes visible when it receives focus.

Let's work through the problem in #494 and see where we land. I think this is a good feature to add and accessibility features like this should be part of docsify core. That said, I'm not sure this is the sort of thing we should add to v4. A significantly improved a11y experience would also be a pretty big achievement for v5.

Note: I've added an accessibility label so we can easily filter the issues list.

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

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Add option to generate skip link for screen reader users
4 participants