Page MenuHomePhabricator

Gitlab announce banner / broadcast message are unreadable due to dark background
Open, Needs TriagePublic

Description

Upstream issue https://gitlab.com/gitlab-org/gitlab/-/issues/386736

Our Gitlab announce has an announce banner showing from time to time. Currently one about a planned downtime next Monday. The text is very dark gray in front of a dark green which makes it unreadable to me:

gitlab_announce.png (166×804 px, 22 KB)

Hand picking the color used and passing them through an accessibility tool to check the contrast https://webaim.org/resources/contrastchecker/?fcolor=535158&bcolor=1C7441 it has a low 1.34:1 ratio and fails all the recommendations ;)

Either the background should be lighter, or the text should be turned to white.

Early this week there was another message albeit I think with a different color, which was similarly not readable (to me). Since I am admin, I can list all previous banners from https://gitlab.wikimedia.org/admin/broadcast_messages

gitlab_broadcast_messages.png (579×653 px, 55 KB)

The sole I can read is the 4th one with a gray background, and even there, the contrast is a little low (at least to me). I have looked at each of the available themes, and they all suffer from the same issue: the text is too dark ;)

Event Timeline

I think this is caused by a regression that has been documented upstream: https://gitlab.com/gitlab-org/gitlab/-/issues/386736. Fixing looks to be bogged down in discussions of UX reviews and component creation rather than just figuring out which css rule was removed/replaced as part of adding dark/light mode support.

Adding custom css to the site is a long requested feature upstream. Some extremely industrious users have documented nginx proxy hacks to inject custom css & js into each page. There are other clever workarounds documented in the feature request as well, but they generally look fragile.

brennen subscribed.

For what it's worth, GitLab admins can adjust the messages here:

https://gitlab.wikimedia.org/admin/broadcast_messages

(Edit: Sorry, I see that was already mentioned in the description.)

I think the "light" theme (#4) seems like the best of a bad set of choices until this is fixed.

I think this is caused by a regression that has been documented upstream: https://gitlab.com/gitlab-org/gitlab/-/issues/386736. Fixing looks to be bogged down in discussions of UX reviews and component creation rather than just figuring out which css rule was removed/replaced as part of adding dark/light mode support.

Bryan you are a hero. The issue is due to dark/light mode indeed. If I head to my user preferences ( https://gitlab.wikimedia.org/-/profile/preferences ) and switch the color theme to Dark Mode (alpha), the banner messages are readable:

gitlabbanners_dark_mode.png (604×661 px, 65 KB)

TADAM

The text has a light class with color #ececef which comes from some "dark" css.

However when using the Light Grey color theme, the text has a a light class with color #333238 (so even darker than in dark mode).

Anyway, I am happy to see there is an issue reported Upstream. I think that is good enough for my case and I assume that will eventually be fixed. We can close our task, unless we want to keep a copy open here.