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

Better UX for screenreader users when tabbing to sign in links (a11y) #969

Closed
meowwwls opened this issue Oct 20, 2018 · 1 comment
Closed
Labels
external contributors welcome contribution is welcome!

Comments

@meowwwls
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In the call out to sign in using Twitter or Github, a screenreader user just hears "Twitter" or "Github" when tabbing through the document. This could be confusing, thinking the link will take the user to Twitter or Github.

Below is a GIF that shows what a screenreader user hears when tabbing to those links:

A recording of using VoiceOver to tab to sign in links, where a user hears Twitter or Github with no context

Describe the solution you'd like
A better experience would be for a screenreader user to hear "Sign in using Twitter" or "Sign in using GitHub".

Describe alternatives you've considered
A simple way to accomplish this while keeping that additional text visually hidden would be to wrap it in a span element use a special visually-hidden class:

<a href="/users/auth/twitter?callback_url=https://dev.to/users/auth/twitter/callback" class="cta cta-button" data-no-instant="">
  <span class="visually-hidden">Sign in using</span> TWITTER
</a>
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

Doing the above, the experience for a screenreader user is better and more accurate:

A recording of using VoiceOver to tab to sign in links, where a user hears 'Sign in using Twitter' or 'Sign in using Github'

@jessleenyc jessleenyc added the external contributors welcome contribution is welcome! label Oct 23, 2018
@jessleenyc
Copy link
Contributor

@meowwwls thanks for creating this issue. This is approved if you'd like to submit a PR, or for anyone who might want to give this a shot!

rpalo added a commit to rpalo/forem that referenced this issue Oct 24, 2018
In the main articles page CTA for signing in via Twitter or Github, previously, screen readers say "Twitter" and "GitHub."  I added an `aria-label` attribute so that screen readers will say "Sign in with Twitter" and "Sign in with GitHub."  Tested on Windows 7, in Chrome, using Chrome Vox extension, and works well!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external contributors welcome contribution is welcome!
Projects
None yet
Development

No branches or pull requests

2 participants