Skip to content

Commit

Permalink
Improve search input semantics (mmistakes#2123)
Browse files Browse the repository at this point in the history
* Update search_form.html

Updates Issue mmistakes#2122 by adding the correct input type and aria label.

* update search_form.html

should be area-placeholder. My mistake. Updates Issue mmistakes#2122

* fix aria-placeholder

Updates issue mmistakes#2123 with a typo found by @mmistakes for liquid syntax.

Close mmistakes#2122
  • Loading branch information
inetbiz authored and mmistakes committed Apr 10, 2019
1 parent a093bbd commit 49e7b53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/search/search_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{%- assign search_provider = site.search_provider | default: "lunr" -%}
{%- case search_provider -%}
{%- when "lunr" -%}
<input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="search" id="search" aria-placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<div id="results" class="results"></div>
{%- when "google" -%}
<form onsubmit="return googleCustomSearchExecute();" id="cse-search-box-form-id">
<input type="text" id="cse-search-input-box-id" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="search" id="cse-search-input-box-id" aria-placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
</form>
<div id="results" class="results">
<gcse:searchresults-only></gcse:searchresults-only>
Expand Down

0 comments on commit 49e7b53

Please sign in to comment.