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

Documentation links are hard to spot #28

Closed
thibaudcolas opened this issue Oct 25, 2018 · 4 comments
Closed

Documentation links are hard to spot #28

thibaudcolas opened this issue Oct 25, 2018 · 4 comments

Comments

@thibaudcolas
Copy link

On the TypeScript website, links within the page content are hard to spot. There are two issues:

  • Normal links are different from paragraph text in color only, with a contrast ratio to surrounding text that is too low (text: #242424, link: #265988, contrast ratio: 2.11:1).
  • Links on code-style text are visually identical to code-style text without links

Example:

https://www.typescriptlang.org/docs/handbook/declaration-files/library-structures.html

typescript-website-link-styles

Search Terms:

Website links, documentation links, documentation code link, accessibility

Expected behavior:

It should be possible to visually scan a documentation page and identify what is a link.

Actual behavior:

Links on paragraph text have a very low contrast ratio that makes them hard to spot. Links on code are impossible to spot, and it's very frustrating to have to hover all the inline snippets or try to guess which ones are links.

Related Issues: Couldn't find any.


I can see a few solutions to this:

  • Style links based on something else than color. The established accessibility best practice is to use an underline.
  • Pick a color for links that has high-enough contrast to surrounding text.
  • For code links, display them with the link color rather than the code color #bf414a.

Relevant resources:

@orta orta transferred this issue from microsoft/TypeScript Jul 10, 2019
@thibaudcolas
Copy link
Author

I see the TypeScript website is now open source, so I’m happy to contribute a PR for this if there is some agreement on the preferred solution.

@orta
Copy link
Contributor

orta commented Sep 7, 2019

Sure thing, I think:

  • links in code should have the underline (and I'm cool with having a bolder red for contrast)
  • Could #187ABF work for the text links? If not then I think having an underline is fine (I'm also OK with both too)

These entire styles should be switched out by the end of the year with a re-design I'm working on which shouldn't have these issues as it'll be based on the fabric design patterns

@ondrej-merkun
Copy link

I'd like to work on this.

ondrej-merkun added a commit to ondrej-merkun/TypeScript-Website that referenced this issue Oct 25, 2019
@thibaudcolas
Copy link
Author

I see this has been fixed in #98 – thank you @ondrej-merkun 🎉.

typescript-website-links

itloverman added a commit to itloverman/typescriptwebsite that referenced this issue Sep 23, 2023
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

No branches or pull requests

3 participants