mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
changed to search landmark in filter sidebar in order to improve accessibility
This commit is contained in:
parent
adae619426
commit
c08f018d15
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% block filters %}
|
{% block filters %}
|
||||||
{% if cl.has_filters %}
|
{% if cl.has_filters %}
|
||||||
<nav id="changelist-filter" aria-labelledby="changelist-filter-header">
|
<search id="changelist-filter" aria-labelledby="changelist-filter-header">
|
||||||
<h2 id="changelist-filter-header">{% translate 'Filter' %}</h2>
|
<h2 id="changelist-filter-header">{% translate 'Filter' %}</h2>
|
||||||
{% if cl.is_facets_optional or cl.has_active_filters %}<div id="changelist-filter-extra-actions">
|
{% if cl.is_facets_optional or cl.has_active_filters %}<div id="changelist-filter-extra-actions">
|
||||||
{% if cl.is_facets_optional %}<h3>
|
{% if cl.is_facets_optional %}<h3>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</h3>{% endif %}
|
</h3>{% endif %}
|
||||||
</div>{% endif %}
|
</div>{% endif %}
|
||||||
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
|
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
|
||||||
</nav>
|
</search>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -873,7 +873,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||||||
response = self.client.get(reverse("admin:admin_views_thing_changelist"))
|
response = self.client.get(reverse("admin:admin_views_thing_changelist"))
|
||||||
self.assertContains(
|
self.assertContains(
|
||||||
response,
|
response,
|
||||||
'<nav id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
'<search id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
||||||
msg_prefix="Expected filter not found in changelist view",
|
msg_prefix="Expected filter not found in changelist view",
|
||||||
)
|
)
|
||||||
self.assertNotContains(
|
self.assertNotContains(
|
||||||
@ -928,7 +928,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||||||
response = self.client.get(changelist_url)
|
response = self.client.get(changelist_url)
|
||||||
self.assertContains(
|
self.assertContains(
|
||||||
response,
|
response,
|
||||||
'<nav id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
'<search id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
||||||
)
|
)
|
||||||
filters = {
|
filters = {
|
||||||
"chap__id__exact": {
|
"chap__id__exact": {
|
||||||
@ -1068,7 +1068,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||||||
)
|
)
|
||||||
self.assertContains(
|
self.assertContains(
|
||||||
response,
|
response,
|
||||||
'<nav id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
'<search id="changelist-filter" aria-labelledby="changelist-filter-header">',
|
||||||
)
|
)
|
||||||
self.assertContains(
|
self.assertContains(
|
||||||
response,
|
response,
|
||||||
|
Loading…
Reference in New Issue
Block a user