mirror of
https://github.com/django/django.git
synced 2025-11-20 11:36:04 +00:00
Fixed #34621 -- Made admin site header render in <div> tag.
This was problematic for screen reader users because they use headings to navigate. Having two <h1> is confusing, and the one in the header wasn’t particularly helpful since it’s the same on all pages.
This commit is contained in:
parent
89c27d8672
commit
cd413bd78a
8 changed files with 19 additions and 10 deletions
|
|
@ -27,7 +27,7 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
|
|||
self.assertContains(response, "<h1>Documentation</h1>", html=True)
|
||||
self.assertContains(
|
||||
response,
|
||||
'<h1 id="site-name"><a href="/admin/">Django administration</a></h1>',
|
||||
'<div id="site-name"><a href="/admin/">Django administration</a></div>',
|
||||
)
|
||||
self.client.logout()
|
||||
response = self.client.get(reverse("django-admindocs-docroot"), follow=True)
|
||||
|
|
@ -153,7 +153,7 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
|
|||
)
|
||||
self.assertContains(
|
||||
response,
|
||||
'<h1 id="site-name"><a href="/admin/">Django administration</a></h1>',
|
||||
'<div id="site-name"><a href="/admin/">Django administration</a></div>',
|
||||
)
|
||||
finally:
|
||||
utils.docutils_is_available = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue