<form action="<%= main_app.search_results_path %>" method="get" role="search" class="search">
  <label class="visually-hidden"><%= t('search_box.label') %></label>
  <input class="search__input" type="search" name="query" value="<%= params[:query] %>" placeholder="<%= t('search_box.placeholder') %>"/>
  <button class="search__submit <%= 'search__submit--green' if search_in_page_header %>" type="submit">
    <span class="icon icon--search"></span>
    <span class="visually-hidden"><%= t('search_box.button_text') %></span>
  </button>
</form>


<form action="<%= main_app.search_results_path %>" method="get" role="search" class="search">
  <label class="visually-hidden" for="search"><%= t('search_box.label') %></label>
  <input class="search__input" id="search" type="search" name="query" value="<%= params[:query] %>" placeholder="<%= t('search_box.placeholder') %>"/>
  <button class="search__submit <%= 'search__submit--green' if search_in_page_header %>" type="submit">
    <span class="icon icon--search"></span>
    <span class="visually-hidden"><%= t('search_box.button_text') %></span>
  </button>
</form>


Add missing for/id to search box
Add missing for/id to search box