From 91e617c743b21a0ebad01f18623a8b31f6f58500 Mon Sep 17 00:00:00 2001 From: Sarah Abderemane Date: Thu, 14 Sep 2023 00:17:50 +0200 Subject: [PATCH] Fixed #34833 -- Made admin's main content render in
tag. --- django/contrib/admin/templates/admin/base.html | 4 ++-- docs/releases/5.0.txt | 3 +++ tests/admin_views/test_nav_sidebar.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index 479b6e743ac..fdbc21a8c83 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -81,7 +81,7 @@ {% endblock %} {% endif %} -
+
{% if not is_popup and is_nav_sidebar_enabled %} {% block nav-sidebar %} {% include "admin/nav_sidebar.html" %} @@ -110,7 +110,7 @@ {% block footer %}{% endblock %}
- +
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index ec80ac64344..5a82c342c0a 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -622,6 +622,9 @@ Miscellaneous a page. Having two ``

`` elements was confusing and the site header wasn't helpful as it is repeated on all pages. +* In order to improve accessibility, the admin's main content area is now + rendered in a ``
`` tag instead of ``
``. + * On databases without native support for the SQL ``XOR`` operator, ``^`` as the exclusive or (``XOR``) operator now returns rows that are matched by an odd number of operands rather than exactly one operand. This is consistent diff --git a/tests/admin_views/test_nav_sidebar.py b/tests/admin_views/test_nav_sidebar.py index e9b367b63b0..908ad52411c 100644 --- a/tests/admin_views/test_nav_sidebar.py +++ b/tests/admin_views/test_nav_sidebar.py @@ -42,7 +42,7 @@ class AdminSidebarTests(TestCase): def test_sidebar_not_on_index(self): response = self.client.get(reverse("test_with_sidebar:index")) - self.assertContains(response, '
') + self.assertContains(response, '
') self.assertNotContains( response, '