#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)
follow-up: 2 comment:1 by , 19 months ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 19 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 include a <nav>
element.
comment:3 by , 19 months ago
Resolution: | wontfix |
---|---|
Status: | closed → new |
Triage Stage: | Unreviewed → Accepted |
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 , 19 months ago
Cc: | added |
---|---|
Severity: | Normal → Release blocker |
Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7.
comment:5 by , 19 months ago
Cc: | added |
---|
comment:6 by , 19 months ago
Cc: | 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 7 7 8 8 {% block bodyclass %}{{ block.super }} dashboard{% endblock %} 9 9 10 {% block nav-breadcrumbs %}{% endblock %}10 {% block breadcrumbs %}{% endblock %} 11 11 12 12 {% block nav-sidebar %}{% endblock %} 13 13
Would you like to prepare a patch via GitHub PR? (a regression test is required.)
comment:7 by , 19 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 , 19 months ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
It's probably safer to have some duplication here.
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!