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

Update anchor titles and text for accessibility #13678

Merged
merged 2 commits into from
Apr 29, 2019
Merged

Update anchor titles and text for accessibility #13678

merged 2 commits into from
Apr 29, 2019

Conversation

missmatsuko
Copy link
Contributor

@missmatsuko missmatsuko commented Apr 27, 2019

Description

I think the use of the title attribute on links has been overused/abused in the docs, and the text content of many links could be improved as well.

Generally, I don't think the title attribute should be used, and there's a lot of material out there about why we should avoid using it:

I found many where the title value would be better if used as the anchor text, or the title was duplicating the anchor text or anchor URL. I don't think having the tooltip on hover containing the same text that's already visible or is a full URL is useful. Additionally, screen readers don't always read aloud the title attribute, and when they do, it's usually in addition to the link text. This means that a screen reader might read a huge URL twice when it's used as both the link's text and title!

I'm not sure if maybe I was a bit heavy-handed or maybe light-handed in some areas, but I think this is an improvement overall.

I tried to avoid making significant changes to verbiage.

I left some titles where I thought it wasn't too critical if it weren't read, and not so disruptive if it were read.

I also left some links where the text was the link URL when the URL itself might be important (e.g. localhost URLs) or if it was really short.

Related Issues

@missmatsuko missmatsuko requested a review from a team April 27, 2019 21:49
@freiksenet freiksenet merged commit ea0cf69 into gatsbyjs:master Apr 29, 2019
@freiksenet
Copy link
Contributor

Thank you so much for doing all this work!

@gatsbot
Copy link

gatsbot bot commented Apr 29, 2019

Holy buckets, @missmatsuko — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@missmatsuko missmatsuko deleted the docs/link-titles branch April 29, 2019 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants