Skip to content

doc: fix color contrast issue in light mode#56272

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Trott:contrast
Dec 18, 2024
Merged

doc: fix color contrast issue in light mode#56272
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Trott:contrast

Conversation

@Trott

@Trott Trott commented Dec 16, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

LGTM !

@Trott Trott added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 17, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 18, 2024
@nodejs-github-bot nodejs-github-bot merged commit e477978 into nodejs:main Dec 18, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in e477978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants