#34036 closed Bug (fixed)
Low text contrast over light blue backgrounds in admin light theme
Reported by: | Thibaud Colas | Owned by: | Mariana |
---|---|---|---|
Component: | contrib.admin | Version: | 4.0 |
Severity: | Normal | Keywords: | accessibility, color contrast, ux |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Pull Requests: | |||
Description (last modified by ) ¶
The Django admin’s light theme "primary" color is a very light shade of blue which doesn’t offer enough contrast when used with white text.
Here is a full contrast grid of the light theme color palette for reference. The problematic "light blue" combos I have identified are:
- Breadcrumbs text where the background --breadcrumbs-bg is light blue, and the text is either very light blue --breadcrumbs-fg, or white (both bad). We would need to either use a much darker shade of blue, or switch breadcrumbs text to a dark grey like --body-fg.
- Table "caption" headers, with light blue bg and a text of either --header-color light yellow for current app, or white --header-link-color, both bad. Here we might be able to resolve this by switching those headers to using the --header-bg / --secondary shade of blue. Or use dark grey --body-fg text.
- Fieldsets / modules h2 headers. Same as table caption headers.
- Choosers’ "chosen" header. Same as table caption headers.
- Non-"default" submit buttons. Here we won’t be able to use the secondary blue since it’s already used for default submit buttons. So we’d need to either change the primary color, or use a dark grey --body-fg text.
Here is a screenshot of a truncated form with those issues illustrated: https://code.djangoproject.com/raw-attachment/ticket/34036/34036.png
Change History (20)
by , 2 years ago
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 2 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 2 years ago
Owner: | changed from | to
---|
comment:6 by , 2 years ago
Patch needs improvement: | set |
---|
comment:7 by , 2 years ago
Patch needs improvement: | unset |
---|
comment:8 by , 2 years ago
Patch needs improvement: | set |
---|
comment:9 by , 20 months ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:10 by , 20 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:11 by , 20 months ago
Patch needs improvement: | unset |
---|
comment:12 by , 20 months ago
Patch needs improvement: | set |
---|
comment:13 by , 20 months ago
Patch needs improvement: | unset |
---|
comment:14 by , 20 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
follow-up: 19 comment:16 by , 14 months ago
Hi All, it seems to me that a:link {color: var(--body-fg);}
is a Django 5.0 regression. Why did that get changed from color: var(--link-fg);
? This might get fixed in #34038 for future versions, but having links default to being the same color as body text seems to me to be a big accessibility regression in Django 5.0.
follow-up: 18 comment:17 by , 14 months ago
Colin, I agree that's a regression. On the PR you mention I've suggested only changing the colours so we can merge that faster. It should probably also be a release blocker.
comment:18 by , 13 months ago
Replying to Tom Carrick:
Colin, I agree that's a regression. On the PR you mention I've suggested only changing the colours so we can merge that faster. It should probably also be a release blocker.
I'll comment about this in the linked ticket #34038 but I did not want to leave this unanswered. In general I would advice on commenting on active/open tickets instead of closed tickets, referencing the closed tickets as necessary. Thank you!
comment:19 by , 13 months ago
Replying to Collin Anderson:
Hi All, it seems to me that
a:link {color: var(--body-fg);}
is a Django 5.0 regression. Why did that get changed fromcolor: var(--link-fg);
? This might get fixed in #34038 for future versions, but having links default to being the same color as body text seems to me to be a big accessibility regression in Django 5.0.
Thanks for the report, I've created a separate ticket for this regression, #35121.
Screenshot of the Django admin with color contrast issues highlighted in red