Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#34512 closed Bug (fixed)

Admin missing breadcrumbs in app index

Reported by: Adam Owned by: Mariusz Felisiak
Component: contrib.admin Version: 4.2
Severity: Release blocker Keywords:
Cc: Florian Perucki, Thibaud Colas, David Sanders Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Breadcrumbs appear on the change list page (e.g. /admin/auth/group/ and /admin/auth/user/), as expected. However, they do not appear on the app index page (e.g. /admin/auth/) as they did in previous versions of Django.

Change History (10)

comment:1 by David Sanders, 18 months ago

Resolution: wontfix
Status: newclosed

Hi Adam,

Thanks for the suggestion but there was a lot of discussion around breadcrumbs and it was agreed to leave them out of the main index page in this PR: https://github.com/django/django/pull/12159

If you want you can start a discussion on the Django Forum or the mailing list on whether it would make sense to include it: https://code.djangoproject.com/wiki/DevelopersMailingList

Thanks!

Last edited 18 months ago by David Sanders (previous) (diff)

in reply to:  1 comment:2 by Adam, 18 months ago

Just to be clear, I am not talking about the MAIN index page, I am talking about the APP index page. The APP index page definitely looks like it's still meant to include breadcrumbs (source), but it doesn't work anymore because of the way the "breadcrumbs" block was changed to be within a <nav> element.

Last edited 18 months ago by Adam (previous) (diff)

comment:3 by David Sanders, 18 months ago

Resolution: wontfix
Status: closednew
Triage Stage: UnreviewedAccepted

Hi Adam,

Apologies, thanks for the link you pasted (& your patience!), that does seem peculiar.

Reopening; after investigating I see that 872b61193b013a700ff88cf50f0eb2cf2c266ff7 changes behaviour causing the breadcrumbs in the app index to disappear.

comment:4 by Mariusz Felisiak, 18 months ago

Cc: Florian Perucki added
Severity: NormalRelease blocker

comment:5 by David Sanders, 18 months ago

Cc: David Sanders added

comment:6 by Mariusz Felisiak, 18 months ago

Cc: Thibaud Colas added

Adam, thanks for the report! What do you think about the following patch? An empty <nav> shouldn't be an issue.

  • django/contrib/admin/templates/admin/index.html

    diff --git a/django/contrib/admin/templates/admin/index.html b/django/contrib/admin/templates/admin/index.html
    index af4f26dec5..5674264093 100644
    a b  
    77
    88{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
    99
    10 {% block nav-breadcrumbs %}{% endblock %}
     10{% block breadcrumbs %}{% endblock %}
    1111
    1212{% block nav-sidebar %}{% endblock %}
    1313

Would you like to prepare a patch via GitHub PR? (a regression test is required.)

comment:7 by David Sanders, 18 months ago

I tested <nav aria-label="Breadcrumbs"></nav> using the macos screen reader and it didn't read the label out. 👍 Not sure how other screen readers would read it though? 🤔

The only concern I'd have with that is if someone adds to the nav-breadcrumbs block in base.html not realising it would impact index.html though sufficient test coverage would quickly highlight that 😊

comment:8 by Mariusz Felisiak, 18 months ago

Has patch: set
Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

It's probably safer to have some duplication here.

PR

comment:9 by GitHub <noreply@…>, 18 months ago

Resolution: fixed
Status: assignedclosed

In 9440f6b:

Fixed #34512 -- Restored breadcrumbs on admin app index view.

Thanks Adam (ataylor32) for the report.

Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 18 months ago

In fffbf850:

[4.2.x] Fixed #34512 -- Restored breadcrumbs on admin app index view.

Thanks Adam (ataylor32) for the report.

Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7.
Backport of 9440f6ba41e5e96458cd7949fc6d605ef5bd09e9 from main

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