Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Deprecated
Features added
--------------

* #11701: HTML Search: Adopt the new `<search>`_ element.
Patch by Bénédikt Tran.

.. _`<search>`: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search

Bugs fixed
----------

Expand Down
4 changes: 2 additions & 2 deletions sphinx/themes/agogo/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ <h3>{{ _('Table of Contents') }}</h3>
{{ toctree(includehidden=True) }}
{%- endblock %}
{%- block sidebarsearch %}
<div role="search">
<search role="search">
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" />
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
</search>
{%- endblock %}
{% endmacro %}

Expand Down
6 changes: 3 additions & 3 deletions sphinx/themes/basic/searchbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" style="display: none" role="search">
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">{{ _('Quick search') }}</h3>
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
{%- endif %}
6 changes: 3 additions & 3 deletions sphinx/themes/basic/searchfield.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" style="display: none" role="search">
<search id="searchbox" style="display: none" role="search">
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search" />
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
{%- endif %}