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

doc: fix color contrast issue in light mode #56272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 16, 2024

Attributes are being highlighted as #f00 on a background of #f2f2f2 in light mode. That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement of WCAG 2.1 AA. This changes the attribute color to #d00, which has a color contrast of 5.09:1 meeting the 4.5:1 requirement.

By the way, I'm not sure if we document it anywhere, but it would probably be useful to document that we strive for WCAG 2.1 AA compliance (and not AAA compliance which might not even be possible, or some other WCAG version compliance).

Before:

image

After:

image

Attributes are being highlighted as #f00 on a background of #f2f2f2.
That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement
of WCAG 2.1 AA. This changes the attribute color to #d00, which has a
color contrast of 5.09:1 meeting the 4.5:1 requirement.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/nodejs-website

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Dec 16, 2024
@AugustinMauroy
Copy link
Member

LGTM !

@Trott Trott added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue Add this label to land a pull request using GitHub Actions. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants