Skip to content

Docs: Line addition diffs don't have enough color contrast in text #5246

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

The red text on green line background in the color diffs has a color contrast ratio of 3.38:1 (#FF0000 on #B8FAE0), which is not strong enough for all users to be able to perceive the text. We should up the contrast to make sure the lines are readable by everyone - at least 4.5:1. See https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html for accessibility docs.

Screenshot of the added lines diff with not enough color contrast for redon green text

(I personally found it a little difficult at first to read such a bold green background.)

Suggestion: how about darkening the code text to #DD0000, halving the opacity of the green background to 00ff9520, and making the + glyphs bold?

Screenshot of the added lines diff with enough color contrast for redon green text

Affected URL(s)

https://typescript-eslint.io/docs/linting/type-linting

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueaccessibility("a11y"): making the site more accessible to all usersgood first issueGood for newcomerspackage: websiteIssues related to the @typescript-eslint website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions