fix(a11y): search input should have a label

This commit is contained in:
Paul Chavard 2022-07-07 13:17:00 +02:00
parent b8db929e62
commit ad0e57a372

View file

@ -1,5 +1,5 @@
.header-search{ role: 'search' } .header-search{ role: 'search' }
= form_tag "#{search_endpoint}", method: :get, class: "form" do = form_tag "#{search_endpoint}", method: :get, class: "form" do
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), title: t('views.users.dossiers.search.search_file') = text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), aria: { label: t('views.users.dossiers.search.search_file') }
%button{ title: t('views.users.dossiers.search.search_file') } %button{ title: t('views.users.dossiers.search.search_file') }
= image_tag "icons/search-blue.svg", alt: 'Rechercher', 'aria-hidden':'true', width: 24, height: 24, loading: 'lazy' = image_tag "icons/search-blue.svg", alt: 'Rechercher', 'aria-hidden':'true', width: 24, height: 24, loading: 'lazy'