Skip to content

Improve dark diff contrast#37477

Open
cyphercodes wants to merge 1 commit intogo-gitea:mainfrom
cyphercodes:issue-37448-accessible-diff-colors
Open

Improve dark diff contrast#37477
cyphercodes wants to merge 1 commit intogo-gitea:mainfrom
cyphercodes:issue-37448-accessible-diff-colors

Conversation

@cyphercodes
Copy link
Copy Markdown
Contributor

Fixes #37448.

  • brighten dark diff added/removed foreground colors to meet WCAG AAA contrast, including dark colorblind variants
  • make diff file-header line counters semibold
  • restore the previous yellow syntax name/type color and guard its contrast on diff rows
  • add a targeted theme contrast regression test

Verification:

  • pnpm exec vitest web_src/js/utils/theme-contrast.test.ts
  • pnpm exec eslint --color --max-warnings=0 web_src/js/utils/theme-contrast.test.ts
  • pnpm exec stylelint --color --max-warnings=0 web_src/css/repo.css web_src/css/themes/theme-gitea-dark.css web_src/css/themes/theme-gitea-dark-protanopia-deuteranopia.css web_src/css/themes/theme-gitea-dark-tritanopia.css
  • make frontend
  • make lint-frontend

Co-authored-by: Hermes Agent (GPT-5.5) <[email protected]>
Signed-off-by: cyphercodes <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 29, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor

Screenshots?

@bircni bircni requested a review from silverwind May 1, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility issues after upgrading to 1.26

3 participants