Remove useless note for screen readers

This commit is contained in:
Corinne Durrmeyer 2024-10-21 14:13:53 +02:00
parent 536160f83e
commit c91d8698bd
No known key found for this signature in database
GPG key ID: DDC049DDA35585B6
2 changed files with 6 additions and 8 deletions

View file

@ -2,8 +2,6 @@
- if @champ.public? - if @champ.public?
- if @champ.mandatory? - if @champ.mandatory?
= render EditableChamp::AsteriskMandatoryComponent.new = render EditableChamp::AsteriskMandatoryComponent.new
- else
%span.sr-only= t('.optional_champ')
- if @champ.forked_with_changes? - if @champ.forked_with_changes?
%span.updated-at.highlighted %span.updated-at.highlighted

View file

@ -442,7 +442,7 @@ describe 'The user', js: true do
fill_individual fill_individual
fill_in('age (facultatif)', with: 10) fill_in('age', with: 10)
click_on 'Déposer le dossier' click_on 'Déposer le dossier'
expect(page).to have_current_path(merci_dossier_path(user_dossier)) expect(page).to have_current_path(merci_dossier_path(user_dossier))
end end
@ -513,7 +513,7 @@ describe 'The user', js: true do
fill_individual fill_individual
fill_in('age (facultatif)', with: '18') fill_in('age', with: '18')
expect(page).to have_css('label', text: 'nom', visible: :visible) expect(page).to have_css('label', text: 'nom', visible: :visible)
expect(page).to have_css('.icon.mandatory') expect(page).to have_css('.icon.mandatory')
click_on 'Déposer le dossier' click_on 'Déposer le dossier'
@ -550,7 +550,7 @@ describe 'The user', js: true do
expect(page).to have_no_css('legend', text: 'info voiture', visible: true) expect(page).to have_no_css('legend', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (facultatif)', with: '18') fill_in('age du candidat', with: '18')
expect(page).to have_css('legend', text: 'permis de conduire', visible: true) expect(page).to have_css('legend', text: 'permis de conduire', visible: true)
expect(page).to have_css('legend', text: 'info voiture', visible: true) expect(page).to have_css('legend', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
@ -563,10 +563,10 @@ describe 'The user', js: true do
expect(page).to have_css('label', text: 'parking', visible: true) expect(page).to have_css('label', text: 'parking', visible: true)
# try to fill with invalid data # try to fill with invalid data
fill_in('tonnage (facultatif)', with: 'a') fill_in('tonnage', with: 'a')
expect(page).to have_no_css('label', text: 'parking', visible: true) expect(page).to have_no_css('label', text: 'parking', visible: true)
fill_in('age du candidat (facultatif)', with: '2') fill_in('age du candidat', with: '2')
expect(page).to have_no_css('legend', text: 'permis de conduire', visible: true) expect(page).to have_no_css('legend', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
@ -578,7 +578,7 @@ describe 'The user', js: true do
expect(page).to have_no_css('legend', text: 'permis de conduire', visible: true) expect(page).to have_no_css('legend', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (facultatif)', with: '18') fill_in('age du candidat', with: '18')
wait_for_autosave wait_for_autosave
# the champ keeps their previous value so they are all displayed # the champ keeps their previous value so they are all displayed