Skip to content

Conversation

Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Jul 28, 2025

Purpose

Improve text accessibility by enhancing the contrast of links on colored backgrounds.

Proposal

  • Changed link color from greyscale-500 to greyscale-700 to make it easier to read on colored backgrounds.

  • Tried to fix the case where text color === background color (like red on red) using CSS overrides.

  • But it didn’t work, because BlockNote.js uses inline styles that are too strong to override.

  • We may need to fix this directly inside BlockNote.js to allow better control of contrast for colored texts.l

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)
link

Ovgodd added 3 commits July 28, 2025 10:57
Updated anchor link color from greyscale-500 to greyscale-600 for better accessibility and WCAG compliance.

Signed-off-by: Cyril <c.gromoff@gmail.com>
Ensures WCAG-compliant text contrast on colored backgrounds (yellow, orange, red, grey) inside bullet list items only.

Signed-off-by: Cyril <c.gromoff@gmail.com>
Reverts the initial fix that used forced color overrides (like grayscale 700)
on bullet list items with same text/background color. This implementation
was not effective due to BlockNote's internal styles and specificity.

A more robust solution should be implemented directly inside BlockNote.js.

Signed-off-by: Cyril <c.gromoff@gmail.com>
@Ovgodd Ovgodd marked this pull request as draft July 28, 2025 12:12
@Ovgodd Ovgodd marked this pull request as ready for review July 28, 2025 12:48
@AntoLC AntoLC self-requested a review July 28, 2025 13:34
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 commits seems to be commit fixup:

  • ♿️(frontend) fix contrast on bullet list items
  • ♻️(frontend) remove previous contrast override on bullet list items

They should be squash inside:

  • ♿(frontend) improve contrast for links

}
a {
color: var(--c--theme--colors--greyscale-500);
color: var(--c--theme--colors--greyscale-700);
Copy link
Collaborator

@AntoLC AntoLC Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add 700 you will not have any color distinction between your text and your link on the other hand:
With 500 (as before):
image
With 700 (new change):
image

I am fine with 700 if you took that into account.

@Ovgodd Ovgodd closed this Jul 28, 2025
@Ovgodd
Copy link
Collaborator Author

Ovgodd commented Jul 28, 2025

Closing this PR — no longer needed / replaced by another PR 1232

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

Successfully merging this pull request may close these issues.

2 participants