mirror of
https://github.com/django/django.git
synced 2025-10-27 15:46:10 +00:00
Fixed #35507 -- Improved accessibility of search and filter elements in the admin changelist.
This commit is contained in:
committed by
Sarah Boyce
parent
8638d8bf74
commit
8bc3dd8727
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
{% block 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>
|
||||
{% if cl.is_facets_optional or cl.has_active_filters %}<div id="changelist-filter-extra-actions">
|
||||
{% if cl.is_facets_optional %}<h3>
|
||||
@@ -86,7 +86,7 @@
|
||||
</h3>{% endif %}
|
||||
</div>{% endif %}
|
||||
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
|
||||
</nav>
|
||||
</search>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{% load i18n static %}
|
||||
{% if cl.search_fields %}
|
||||
<div id="toolbar"><form id="changelist-search" method="get" role="search">
|
||||
<div id="toolbar">
|
||||
<h2 id="changelist-search-form" class="visually-hidden">{% blocktranslate with name=cl.opts.verbose_name_plural %}Search {{ name }}{% endblocktranslate %}</h2>
|
||||
<form id="changelist-search" method="get" role="search" aria-labelledby="changelist-search-form">
|
||||
<div><!-- DIV needed for valid HTML -->
|
||||
<label for="searchbar"><img src="{% static "admin/img/search.svg" %}" alt="Search"></label>
|
||||
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar"{% if cl.search_help_text %} aria-describedby="searchbar_helptext"{% endif %}>
|
||||
|
||||
Reference in New Issue
Block a user