Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use <search> HTML tag instead of <div>. #11704

Merged
merged 6 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
use <search> HTML tag
  • Loading branch information
picnixz committed Oct 4, 2023
commit 38eb30e70e7b1d1da02d5259a8f9452c34f07ae2
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 role="search">
picnixz marked this conversation as resolved.
Show resolved Hide resolved
<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" />
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
<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 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" />
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
{%- endif %}