Page MenuHomePhabricator

Avoid use of pure black, or, use Canvas and CanvasText CSS values as the background color in the Dark mode
Open, Stalled, MediumPublicDesign

Description

This is mentioned on https://www.mediawiki.org/wiki/Talk:Reading/Web/Accessibility_for_reading/Archive1#Pure-black_dark_mode but I searched Phabricator so wished open a file before too late so I'll quote

[..] Too many dark modes on websites use pure black as the background colour. This also causes eyestrain and personally causes headaches, especially with pure white text on top. One solution could be to have two different dark modes, one with pure black and one with a shade of dark gray - that then accomodates those who prefer the pure black.

What I like to suggest also using browser provided Canvas and CanvasText colors in dark mode which has great defaults specially for dark mode https://web.dev/articles/light-dark (if not touching background-color isn't an option) which probably for users in need of pure black (OLED screens) will handle the situation automatically probably if it doesn't right now.

Event Timeline

Hi @Ebrahim, please bring this up on the talk page at https://www.mediawiki.org/wiki/Talk:Reading/Web/Accessibility_for_reading , as Phabricator is mostly for bug reports, feature requests, and planning work - thanks a lot! :)

Hi @Aklapper The discussion on the talk page is exactly why there is a ticket. See https://www.mediawiki.org/wiki/Talk:Reading/Web/Accessibility_for_reading/Archive1#Pure-black_dark_mode

Quote by @JScherer-WMF :

Thanks for the feedback @Suntooooth! We do not intend to use #000000 as the dark background in the new Night colour palette. I agree that it's harsh and results in a poorer reading experience. JScherer-WMF (talk) 20:40, 6 February 2024 (UTC)

But that hasn't changed so it should be tracked somewhere.

Ladsgroup renamed this task from Avoid use of pure black, or, use Canvas and CanvasText CSS values in the Dark mode to Avoid use of pure black, or, use Canvas and CanvasText CSS values as the background color in the Dark mode.Mon, Jun 10, 6:24 PM

@Ladsgroup what exactly is the issue here though - we are avoiding these colors? We are not using #000 as the background color for text... we're using #f8f9fa color text on #202122 .

Hmm, I see #000 as background of links:

grafik.png (768×1 px, 449 KB)

And background of text is indeed not #000, it's not #202122 either. It's #101418 which is so black that it seems people are mistaking it as black? *Maybe my browser is is acting up)

grafik.png (768×1 px, 451 KB)

(URL to test: https://fa.wikipedia.org/wiki/%D9%81%D8%B1%D8%A7%D9%86%D8%B3%DB%8C%D8%B3_%D9%81%D9%88%D8%B1%D8%AF_%DA%A9%D9%88%D9%BE%D9%88%D9%84%D8%A7)

what exactly is the issue here though

That was my perception that this is still pure black not @Ladsgroup fault so I'm sorry about it and the reason for perception was I still was thinking this is pure black given the topic also as the contrast is higher than what is elsewhere consulting my designer friend (that's why I thought it's still pure black) and my suggestion is to use Canvas and CanvasText as CSS color values as they don't have this level of contrast.

Sorry for confusion. Yes, there is a rule on .mw-page-container that should be setting background to --background-color-base CSS variable which should be #101418 in dark mode.

Screenshot 2024-06-10 at 1.27.03 PM.png (346×483 px, 79 KB)

Jdlrobson changed the task status from Open to Stalled.Tue, Jun 11, 4:15 PM
Jdlrobson triaged this task as Medium priority.

This needs design review from Justin.