Merge pull request #7545 from tchak/fix-a11y-errors

Fix a11y errors
This commit is contained in:
Paul Chavard 2022-07-12 08:47:37 +02:00 committed by GitHub
commit 320d5248e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -4,7 +4,7 @@
= t(".download_all")
- else
= t(".download", count: @count)
#download-menu.dropdown-content.fade-in-down{ style: 'width: 450px', data: { menu_button_target: 'menu' } }
.dropdown-content.fade-in-down{ style: 'width: 450px', data: { menu_button_target: 'menu' }, id: @count.nil? ? "download_menu" : "download_all_menu" }
%ul.dropdown-items{ 'data-turbo': 'true' }
- exports.each do |item|
- export = item[:export]

View file

@ -47,11 +47,11 @@
.cell
= form.label :drop_down_list_value, "Options de la liste", for: dom_id(type_de_champ, :drop_down_list_value)
= form.text_area :drop_down_list_value, class: 'small-margin small width-100', rows: 7, id: dom_id(type_de_champ, :drop_down_list_value)
- if type_de_champ.drop_down_list_with_other?
.cell
= form.label :drop_down_other do
Proposer une option 'autre' avec un texte libre
= form.check_box :drop_down_other, class: "small-margin small"
- if type_de_champ.drop_down_list_with_other?
.cell
= form.label :drop_down_other, for: dom_id(type_de_champ, :drop_down_other) do
Proposer une option « autre » avec un texte libre
= form.check_box :drop_down_other, class: "small-margin small", id: dom_id(type_de_champ, :drop_down_other)
- if type_de_champ.linked_drop_down_list?
.flex.column.justify-start.flex-grow

View file

@ -44,7 +44,7 @@
.dropdown{ data: { controller: 'menu-button' } }
%button.button.dropdown-button.procedures-actions-btn{ data: { menu_button_target: 'button' } }
Actions
#actions-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: dom_id(procedure, :actions_menu) }
%ul.dropdown-items.pl-0
- if !procedure.close? && !procedure.discarded?
%li

View file

@ -5,7 +5,7 @@
.dropdown.user-dossier-actions{ data: { controller: 'menu-button' } }
%button.button.dropdown-button{ data: { menu_button_target: 'button' } }
Actions
#actions-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: "dossier_#{dossier_id}_actions_menu" }
%ul.dropdown-items
- if close_to_expiration
%li

View file

@ -1,5 +1,5 @@
.header-search{ role: 'search' }
= 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') }
= image_tag "icons/search-blue.svg", alt: 'Rechercher', 'aria-hidden':'true', width: 24, height: 24, loading: 'lazy'

View file

@ -8,7 +8,7 @@
.dropdown.user-dossier-actions{ data: { controller: 'menu-button' } }
%button.button.dropdown-button{ data: { menu_button_target: 'button' } }
= t('views.users.dossiers.dossier_action.actions')
#actions-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: dom_id(dossier, :actions_menu) }
%ul.dropdown-items
- if has_edit_action
- if dossier.brouillon?

View file

@ -135,7 +135,7 @@ describe 'As an administrateur I can edit types de champ', js: true do
select('Choix parmi une liste', from: 'Type de champ')
fill_in 'Libellé du champ', with: 'Libellé de champ menu déroulant', fill_options: { clear: :backspace }
fill_in 'Options de la liste', with: 'Un menu', fill_options: { clear: :backspace }
check "Proposer une option 'autre' avec un texte libre"
check "Proposer une option « autre » avec un texte libre"
wait_until { procedure.draft_types_de_champ.first.drop_down_list_options == ['', 'Un menu'] }
wait_until { procedure.draft_types_de_champ.first.drop_down_other == "1" }