Improve color palette accessibility #2768
Ovgodd
started this conversation in
Ideas & Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request
Hello, I'm opening a discussion about color accessibility in BlockNote. This came up during an accessibility audit of Docs (La Suite).
Audited document:
https://docs.numerique.gouv.fr/docs/0d998bef-1b69-47ce-bd18-83d4d849c734/
Is your feature request related to a problem or unsupported use case? Please describe.
The audit asks: should Docs guarantee contrast for any color a user might use?
The answer is usually no, if users could pick anything.
The real issue is not "let users pick safe colors". It's "don't offer colors in that list that break the contrast ratio".
BlockNote color palette
Right now several of those presets fail WCAG AA in common cases. The fix the audit points to is to restrict it, remove or adjust swatches that don't pass, and only show options that work for their intended use (text vs highlight background).
Contrast issues we found
We checked ratios against WCAG AA (4.5:1 for normal text).
Light mode, text color on white (
#FFFFFF)Light mode, default editor text (
#3F3F3F) on highlight backgroundBackground-only use looks fine. Everything we tested was above 8:1.
Dark mode, text color on editor background (
#1F1F1F)Dark mode, default editor text (
#CFCFCF) on highlight backgroundText + background from the same family
If someone sets both (e.g. red text on red background), it gets worse:
From the audit (table cells):
Describe the solution you'd like
Restrict the default palette so users can only pick colors that meet contrast requirements. No new free-form color picker needed.
Describe alternatives you've considered
Beta Was this translation helpful? Give feedback.
All reactions