microsoft / microsoft/monaco-editor

[Bug] The color contrast for the red and green lines that indicate code changes in the Monaco diff editor is low

Open
#4,750 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility bug diff-editor
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/

Monaco Editor Playground Code

Reproduction Steps

The color contrast for the red and green lines that indicate code changes in the Monaco diff editor is low.

https://microsoft.github.io/monaco-editor/

Image

Red line:

Foreground element: #FFA9A4
Background or adjacent element: White background #FFFFFF
Contrast Ratio: 1.8:1

Green line:

Foreground element: #CEE59E
Background or adjacent element: White background #FFFFFF
Contrast Ratio: 1.3:1

1.4.11 Non-text Contrast (AA) (opens in new window) suggests the contrast ratio to be at least 3:1.

Question:

  1. Can we modify these colors within the Monaco code?
  2. If we are not allowed to modify it in Monaco code, can we override color settings from our side?
Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Monaco Editor Playground linked in the issue and reproduce the diff editor colors shown there. Trace where the red and green change indicators are configured, then verify that both colors meet the referenced 3:1 non-text contrast ratio against a white background. The issue does not name source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.