fix(theming): Ensure all text colors have enough contrast for accessibility#40773
Conversation
17a051a to
4349b2b
Compare
|
Could we have testing with various combinations of foreground/background colors so we're sure all of them pass WCAG AA ? :) |
4349b2b to
2b820eb
Compare
@skjnldsv Done but some combination are failing, how to handle those, ignore? Fix? 😅 |
6b469bd to
499208e
Compare
|
cc @jancborchardt are those failing combinations expected to be used together or do we never want them to be used together? (those without a check mark but a number) Previous with Details |
|
Just to clarify, since most of the issues appear with these values:
|
12d998a to
1641e4e
Compare
|
@jancborchardt Basically I see 3 problems:
|
Yeah sounds good. Maybe also good to look at what other dark modes like e.g. GitHub do?
Yep, exactly.
Yes – we should probably just not use text in those colors, and if we have warning text always use NcNoteCard. Or if it needs to be smaller use the colored icon but normal colored text. |
To not confuse @jancborchardt it is not about dark mode, it is about that slightly darker background for e.g. every second table row or something like that (similar to hover). |
1641e4e to
c008f3e
Compare
|
@nextcloud/designers Please review that you are ok with this changes. I tried to stick as close as possible to the previous values, but for text accessibility at least some values had to be changed. |
|
@susnux could you post before/after screenshots of the specific cases we should check for easier review? :) |
c008f3e to
16bf124
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
|
|
@susnux The latest screenshots look great to me :) much closer color to what is existing compared to the previous screenshot 👍 if the accessibility issues are also solved then we can go ahead :) |
skjnldsv
left a comment
There was a problem hiding this comment.
Amazing work as always!! Thank you so much for doing this!
| --color-text-light: var(--color-main-text); | ||
| /** @deprecated use `--color-text-maxcontrast` instead */ | ||
| --color-text-lighter: var(--color-text-maxcontrast); |
There was a problem hiding this comment.
This needs to be in the documentation 👍
There was a problem hiding this comment.
Learned this here:
#40773 (comment)
So I added that comments, is there a place to document that?
There was a problem hiding this comment.
@jancborchardt since when does color-text-lighter, color-text-light, been removed/deprecated?
Was there an official statement somewhere?
@susnux you can document it in the migration guide https://github.com/nextcloud/documentation/blob/master/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_28.rst
There was a problem hiding this comment.
Was there an official statement somewhere?
If yes, does the 3 years rules also apply to CSS variables? (Just because I am curious, like how long do we keep providing the deprecated SCSS variables).
There was a problem hiding this comment.
No clue really, For frontend we followed more the rule of 3 versions 🙈
There was a problem hiding this comment.
JuliaKirschenheuter
left a comment
There was a problem hiding this comment.
cool! Thank you
….5:1 even on hover Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…deprecated Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…bility Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
3528ee4 to
3378a73
Compare
|
Github 🤦 |


Summary
Part of multiple a11y issues.
Text that has assigned the color
--color-text-maxcontrastshould always have a contrast of 4.5:1, even when the element is hovered where the background will be--color-background-hover.So the
maxcontrastcolor is slightly adjusted (I honestly do not see a difference 🙈 ) but it ensures a contrast of 4.5:1Screenshots
Checklist