fix(a11y): add id to drop_down_other

This commit is contained in:
Paul Chavard 2022-07-07 13:08:57 +02:00
parent 7973d176d3
commit b8db929e62
2 changed files with 6 additions and 6 deletions

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

@ -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" }