Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33727 closed Bug (fixed)

Color contrast issues in admin header area

Reported by: Thibaud Colas Owned by: Mohammed Y. Alnajdi
Component: contrib.admin Version: dev
Severity: Normal Keywords: accessibility, color contrast
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Thibaud Colas)

There are three color contrast issues in the Django admin area:

  • The <h1>’s yellow only has enough contrast against the blue for large text, which is defined by SC 1.4.3: Contrast (Minimum) as 18pt and up (24px). This works for large viewports, but on smaller ones the heading’s font size is reduced to 20px / 1.25rem, which is too small to qualify as large text.
  • In light mode, the links’ hover color doesn’t have enough contrast with the background
  • In dark mode, same issue with the links’ hover color (but with a different color)

Here is a contrast grid with the relevant color contrasts.

And a screenshot of two out of three issues:

https://code.djangoproject.com/raw-attachment/ticket/33727/admin-contrast.png

---

My recommended solutions for this are to:

  • Keep the "small viewport" heading at 24px
  • Change the hover effect for links in the header – either remove it (with the cursor change only), or remove the text underline rather than changing the color.

Attachments (1)

admin-contrast.png (18.3 KB ) - added by Thibaud Colas 2 years ago.

Download all attachments as: .zip

Change History (10)

by Thibaud Colas, 2 years ago

Attachment: admin-contrast.png added

comment:1 by Thibaud Colas, 2 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 2 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

Thanks for the report! Agreed, keeping 24px heading on smaller screens and removing text underline rather than changing the color sound good.

comment:3 by Mohammed Y. Alnajdi, 2 years ago

Owner: changed from nobody to Mohammed Y. Alnajdi
Status: newassigned

comment:5 by Mariusz Felisiak, 2 years ago

Has patch: set

comment:6 by Mariusz Felisiak, 2 years ago

Patch needs improvement: set

comment:7 by Mariusz Felisiak, 2 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 78bf1565:

Fixed #33727 -- Fixed color contrasts in admin header.

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 51de294d:

[4.1.x] Fixed #33727 -- Fixed color contrasts in admin header.

Backport of 78bf1565c37d0eef2ff9dd72a2cead0b772b2444 from main

Note: See TracTickets for help on using tickets.
Back to Top