mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #34833 -- Made admin's main content render in <main> tag.
This commit is contained in:
parent
f92e68c30a
commit
91e617c743
@ -81,7 +81,7 @@
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
<div class="main" id="main">
|
||||
<main class="main" id="main">
|
||||
{% if not is_popup and is_nav_sidebar_enabled %}
|
||||
{% block nav-sidebar %}
|
||||
{% include "admin/nav_sidebar.html" %}
|
||||
@ -110,7 +110,7 @@
|
||||
<!-- END Content -->
|
||||
{% block footer %}<div id="footer"></div>{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
|
||||
|
@ -622,6 +622,9 @@ Miscellaneous
|
||||
a page. Having two ``<h1>`` 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 ``<main>`` tag instead of ``<div>``.
|
||||
|
||||
* 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
|
||||
|
@ -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, '<div class="main" id="main">')
|
||||
self.assertContains(response, '<main class="main" id="main">')
|
||||
self.assertNotContains(
|
||||
response, '<nav class="sticky" id="nav-sidebar" aria-label="Sidebar">'
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user