Skip to content

Commit

Permalink
Add search input field labels using aria-label (#3046)
Browse files Browse the repository at this point in the history
* Adding aria-label to search input on the search.html page
* Adding aria-label to the search input field for the search box
  • Loading branch information
dmundra committed Apr 28, 2023
1 parent f3f6631 commit 97440ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mkdocs/themes/readthedocs/search.html
Expand Up @@ -6,7 +6,7 @@ <h1 id="search">{% trans %}Search Results{% endtrans %}</h1>

<form id="content_search" action="search.html">
<span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
<input name="q" id="mkdocs-search-query" type="text" class="search_input search-query ui-autocomplete-input" placeholder="{% trans %}Search the Docs{% endtrans %}" autocomplete="off" autofocus title="{% trans %}Type search term here{% endtrans %}">
<input name="q" id="mkdocs-search-query" type="text" class="search_input search-query ui-autocomplete-input" placeholder="{% trans %}Search the Docs{% endtrans %}" aria-label="{% trans %}Search the Docs{% endtrans %}" autocomplete="off" autofocus title="{% trans %}Type search term here{% endtrans %}">
</form>

<div id="mkdocs-search-results" class="search-results" data-no-results-text="{% trans %}No results found{% endtrans %}">
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/themes/readthedocs/searchbox.html
@@ -1,5 +1,5 @@
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="{{ base_url }}/search.html" method="get">
<input type="text" name="q" placeholder="{% trans %}Search docs{% endtrans %}" title="{% trans %}Type search term here{% endtrans %}" />
<input type="text" name="q" placeholder="{% trans %}Search docs{% endtrans %}" aria-label="{% trans %}Search docs{% endtrans %}" title="{% trans %}Type search term here{% endtrans %}" />
</form>
</div>

0 comments on commit 97440ca

Please sign in to comment.