Accessibility: docs code examples/link styling is very confusing and has insufficient contrast
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
In the documentation, the styling is really confusing.
Here's an example, taken from the docs for createContext in dark mode, although the issue is present in light mode as well:
Here you can see:
- a text link ("pass information deep down") which is blue and not underlined and has no background color
- variables in source code, which are a similar shade of blue on a darker blue background, with a bottom box border, and aren't clickable
- string values in source code, same as above but purple on purple
- a concept in text ("context object"), variable width text, same colorations as source variables, not clickable
- another concept ("default values") same as above but purple
- a text link which is a function name (
useContext()), blue monospaced text on a gray background
This assortment of similar-but-different color combinations is making it hard for me to read. Everything with a box bottom border looks like a link and I keep trying to click them out of habit that they're a crossreference. The use of blue and purple for "context object" and "default values" also add to the problem because they look like unvisited/visited links. At the very least, could you please consider changing either your source code highlights or your link color to be something drastically other than blue?
Running an accessibility checker on the pages also shows that many of the styles fail WCAG accessibility standards for text contrast.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the createContext documentation page in both light and dark modes, then run an accessibility checker against the reported styles. Done means links, code values, and concepts are visually distinguishable and the reported text contrast issues meet WCAG requirements.
Written by the indexing model from the issue text.
Assessment
- Domain
- accessibility, design, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100