Opened 2 years ago

Last modified 10 months ago

#34036 closed Bug

Low text contrast over light blue backgrounds in admin light theme — at Version 1

Reported by: Thibaud Colas Owned by: nobody
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

Description (last modified by Thibaud Colas)

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:

  1. 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.
  2. 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.
  3. Fieldsets / modules h2 headers. Same as table caption headers.
  4. Choosers’ "chosen" header. Same as table caption headers.
  5. 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 (2)

by Thibaud Colas, 2 years ago

Attachment: 34036.png added

Screenshot of the Django admin with color contrast issues highlighted in red

comment:1 by Thibaud Colas, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top