Opened 14 months ago

Last modified 45 hours ago

#34917 assigned Cleanup/optimization

Links in the Django admin should be underlined.

Reported by: Dmitriy Chukhin Owned by: Antoliny
Component: contrib.admin Version: dev
Severity: Normal Keywords: accessibility, anchor
Cc: Thibaud Colas, Sarah Abderemane, Tom Carrick, Ülgen Sarıkavak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description (last modified by Dmitriy Chukhin)

In the Django admin, some fields have text with an anchor link, and this text appears without an indication that it is a link.
The text should appear with an indication (an underline), to meet accessibility guidelines.

Attachments (2)

Screenshot.png (66.7 KB ) - added by Dmitriy Chukhin 14 months ago.
django 5.1dev20231027 link styles.png (15.5 KB ) - added by Thibaud Colas 14 months ago.

Download all attachments as: .zip

Change History (18)

comment:1 by Dmitriy Chukhin, 14 months ago

Description: modified (diff)

by Dmitriy Chukhin, 14 months ago

Attachment: Screenshot.png added

comment:2 by Mariusz Felisiak, 14 months ago

Cc: Thibaud Colas Sarah Abderemane Tom Carrick added
Resolution: wontfix
Status: assignedclosed

Thanks for the ticket, however, this was discussed as a part of #34038, and at the end removed from the recommendation.

comment:3 by Dmitriy Chukhin, 14 months ago

Description: modified (diff)

comment:4 by Dmitriy Chukhin, 14 months ago

Description: modified (diff)

by Thibaud Colas, 14 months ago

comment:5 by Thibaud Colas, 14 months ago

Resolution: wontfix
Status: closednew

@Marius I do not know what discussion you’re referring to in #34038 but the resolution isn’t appropriate. Links need to be clearly identifiable. There needs to be a way to tell the links apart from surrounding text without relying on color. The current styles implemented in the admin are so bad I’d qualify this as a release blocker if the changes were made in the last release.

As a practical example, it is more or less impossible to identify where links are in help text:

https://code.djangoproject.com/raw-attachment/ticket/34917/django%205.1dev20231027%20link%20styles.png

As far as this issue about _links within text_, I would recommend:

  • A minimum contrast ratio of ideally 4.5:1, at the vey least 3:1 between link text color and text color. Currently we’re somewhere around 1.6:1 to 2.2:1 in the light theme, which is unacceptable.
  • And an underline, for people who have severe color blindness.

For links outside text there are more options. I also think the current design choices aren’t fit for purpose but that likely warrants a separate ticket as the resolution could be very different from what makes sense for links within text.

Last edited 14 months ago by Thibaud Colas (previous) (diff)

comment:6 by Mariusz Felisiak, 14 months ago

Resolution: duplicate
Status: newclosed

The current styles implemented in the admin are so bad I’d qualify this as a release blocker if the changes were made in the last release.

Why as a release blocker? We can decide that #34038 is not completely fixed without an underline, but 1d0fa848e084cad62d0bb6bde3b51e4862558e57 didn't introduce any regression so it's not a release blocker.

Closing as a duplicate of #34038.

comment:7 by Mariusz Felisiak, 14 months ago

I reopened #34038.

comment:8 by Mariusz Felisiak, 11 months ago

Resolution: duplicate
Status: closednew
Summary: Links within text in the Django admin are difficult to identifyLinks in the Django admin should be underlined.
Triage Stage: UnreviewedSomeday/Maybe
Type: BugCleanup/optimization

Reopen for adding underline to links in the admin.

Marking as "Someday/Maybe" pending a discussion by the Accessibility Team to determine the scope of required changes.

comment:9 by Tom Carrick, 10 months ago

So we've had a brief discussion and we've agreed that links in the "main content area" should be underlined.

My personal thought on "main content area" is "not the header or nav sidebar".

I think this should ideally exclude the site index and app index pages (they're quite clear), but acceptable if these are underlined as well.

There will probably also be other exceptions such as pagination links and other links that look like buttons, but I think we can tease those out in a review.

comment:10 by Tom Carrick, 10 months ago

Has patch: set
Patch needs improvement: set
Triage Stage: Someday/MaybeAccepted

comment:13 by Ülgen Sarıkavak, 9 months ago

Cc: Ülgen Sarıkavak added

comment:14 by Tim Graham, 8 months ago

Patch needs improvement: unset

I believe the PR is awaiting review.

comment:15 by Sarah Boyce, 8 months ago

Patch needs improvement: set

comment:16 by Sarah Boyce, 8 months ago

Owner: changed from nobody to Maira Usman
Status: newassigned

comment:17 by Alexander Lazarević, 7 weeks ago

Maira or anybode else has planned to continue working on it?

comment:18 by Antoliny, 45 hours ago

Owner: changed from Maira Usman to Antoliny
Note: See TracTickets for help on using tickets.
Back to Top