Skip to content

Commit fb4c979

Browse files
committed
Add aria-label to search box
Authored by @stsewd
1 parent 4147e0f commit fb4c979

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
{%- if 'singlehtml' not in builder %}
2-
<div role="search">
3-
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
4-
<input type="text" name="q" placeholder="{{ _('Search docs') }}" />
5-
<input type="hidden" name="check_keywords" value="yes" />
6-
<input type="hidden" name="area" value="default" />
7-
</form>
1+
{#
2+
basic/searchbox.html
3+
~~~~~~~~~~~~~~~~~~~~
4+
5+
Sphinx sidebar template: quick search box.
6+
7+
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
8+
:license: BSD, see https://github.com/sphinx-doc/sphinx/blob/master/LICENSE for details.
9+
10+
.. note::
11+
12+
This file is the same, except the "Go" button was removed and the label is an aria-label.
13+
#}
14+
{%- if pagename != "search" and builder != "singlehtml" %}
15+
<div id="searchbox" role="search">
16+
<div class="searchformwrapper">
17+
<form class="search" action="{{ pathto('search') }}" method="get">
18+
<input aria-label="{{ _('Search docs') }}" type="text" name="q" id="main-search" placeholder="{{ _('Search docs') }}"/>
19+
</form>
20+
</div>
821
</div>
922
{%- endif %}

0 commit comments

Comments
 (0)