Change label for search text

Label wraps input field to prevent error on missing label (hidden by CSS).
This commit is contained in:
decabeza
2019-03-13 17:40:22 +01:00
parent cfe034d401
commit f7e327af09

View File

@@ -2,8 +2,12 @@
<h1 class="show-for-sr"><%= t("shared.outline.searcher") %></h1>
<%= form_tag search_path, method: :get do %>
<div class="input-group">
<label for="search_text" class="show-for-sr"><%= t("#{i18n_namespace}.title") %></label>
<input type="text" name="search" placeholder='<%= t("#{i18n_namespace}.placeholder") %>' class="input-group-field" value="<%= params[:search] %>" id="search_text">
<label for="search_text">
<span class="show-for-sr"><%= t("#{i18n_namespace}.title") %></span>
<input type="text" name="search" placeholder="<%= t("#{i18n_namespace}.placeholder") %>"
class="input-group-field"
value="<%= params[:search] %>" id="search_text">
</label>
<div class="input-group-button">
<button type="submit" class="button" title="<%= t("#{i18n_namespace}.button") %>">
<span class="show-for-sr"><%= t("#{i18n_namespace}.button") %></span>