mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #34832 -- Made admin's header content render in <header> tag.
Header tag was changed to <header> get the landmark banner for accessibility.
This commit is contained in:
parent
68d769e691
commit
814e7bc220
1
AUTHORS
1
AUTHORS
@ -887,6 +887,7 @@ answer newbie questions, and generally made Django that much better:
|
|||||||
Sander Dijkhuis <sander.dijkhuis@gmail.com>
|
Sander Dijkhuis <sander.dijkhuis@gmail.com>
|
||||||
Sanket Saurav <sanketsaurav@gmail.com>
|
Sanket Saurav <sanketsaurav@gmail.com>
|
||||||
Sanyam Khurana <sanyam.khurana01@gmail.com>
|
Sanyam Khurana <sanyam.khurana01@gmail.com>
|
||||||
|
Sarah Abderemane <https://github.com/sabderemane>
|
||||||
Sarah Boyce <https://github.com/sarahboyce>
|
Sarah Boyce <https://github.com/sarahboyce>
|
||||||
Sarthak Mehrish <sarthakmeh03@gmail.com>
|
Sarthak Mehrish <sarthakmeh03@gmail.com>
|
||||||
schwank@gmail.com
|
schwank@gmail.com
|
||||||
|
@ -834,10 +834,6 @@ a.deletelink:focus, a.deletelink:hover {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container > div {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container > .main {
|
#container > .main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
@ -922,7 +918,6 @@ a.deletelink:focus, a.deletelink:hover {
|
|||||||
padding: 10px 40px;
|
padding: 10px 40px;
|
||||||
background: var(--header-bg);
|
background: var(--header-bg);
|
||||||
color: var(--header-color);
|
color: var(--header-color);
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#header a:link, #header a:visited, #logout-form button {
|
#header a:link, #header a:visited, #logout-form button {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{% if not is_popup %}
|
{% if not is_popup %}
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div id="header">
|
<header id="header">
|
||||||
<div id="branding">
|
<div id="branding">
|
||||||
{% block branding %}{% endblock %}
|
{% block branding %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
@ -66,7 +66,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block nav-global %}{% endblock %}
|
{% block nav-global %}{% endblock %}
|
||||||
</div>
|
</header>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<!-- END Header -->
|
<!-- END Header -->
|
||||||
{% block nav-breadcrumbs %}
|
{% block nav-breadcrumbs %}
|
||||||
|
@ -629,8 +629,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
|
* In order to improve accessibility, the admin's main content area and header
|
||||||
rendered in a ``<main>`` tag instead of ``<div>``.
|
content area are now rendered in a ``<main>`` and ``<header>`` 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
|
||||||
|
@ -1516,6 +1516,13 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_header(self):
|
||||||
|
response = self.client.get(reverse("admin:index"))
|
||||||
|
self.assertContains(response, '<header id="header">')
|
||||||
|
self.client.logout()
|
||||||
|
response = self.client.get(reverse("admin:login"))
|
||||||
|
self.assertContains(response, '<header id="header">')
|
||||||
|
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
AUTH_PASSWORD_VALIDATORS=[
|
AUTH_PASSWORD_VALIDATORS=[
|
||||||
|
Loading…
Reference in New Issue
Block a user