mirror of
https://github.com/django/django.git
synced 2025-06-04 02:59:13 +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 %}
|
{% endblock %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="main" id="main">
|
<main class="main" id="main">
|
||||||
{% if not is_popup and is_nav_sidebar_enabled %}
|
{% if not is_popup and is_nav_sidebar_enabled %}
|
||||||
{% block nav-sidebar %}
|
{% block nav-sidebar %}
|
||||||
{% include "admin/nav_sidebar.html" %}
|
{% include "admin/nav_sidebar.html" %}
|
||||||
@ -110,7 +110,7 @@
|
|||||||
<!-- END Content -->
|
<!-- END Content -->
|
||||||
{% block footer %}<div id="footer"></div>{% endblock %}
|
{% block footer %}<div id="footer"></div>{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<!-- END Container -->
|
<!-- END Container -->
|
||||||
|
|
||||||
|
@ -622,6 +622,9 @@ Miscellaneous
|
|||||||
a page. Having two ``<h1>`` elements was confusing and the site header wasn't
|
a page. Having two ``<h1>`` elements was confusing and the site header wasn't
|
||||||
helpful as it is repeated on all pages.
|
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
|
* On databases without native support for the SQL ``XOR`` operator, ``^`` as
|
||||||
the exclusive or (``XOR``) operator now returns rows that are matched by an
|
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
|
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):
|
def test_sidebar_not_on_index(self):
|
||||||
response = self.client.get(reverse("test_with_sidebar:index"))
|
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(
|
self.assertNotContains(
|
||||||
response, '<nav class="sticky" id="nav-sidebar" aria-label="Sidebar">'
|
response, '<nav class="sticky" id="nav-sidebar" aria-label="Sidebar">'
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user