Merge pull request #10283 from demarches-simplifiees/fix-main-menu-a11y

Remplacement de l'attribut `aria-current="page"` par `aria-current="true"` lorsque le lien concerne un ensemble de pages
This commit is contained in:
Colin Darie 2024-04-09 08:57:09 +00:00 committed by GitHub
commit 4bbe136987
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View file

@ -24,7 +24,7 @@ describe MainNavigation::InstructeurExpertNavigationComponent, type: :component
describe 'when instructor is signed in' do
it 'renders a link to instructeur procedures with current page class' do
expect(subject).to have_link('Démarches', href: component.helpers.instructeur_procedures_path)
expect(subject).to have_selector('a[aria-current="page"]', text: 'Démarches')
expect(subject).to have_selector('a[aria-current="true"]', text: 'Démarches')
end
it 'does not have Avis' do
@ -39,7 +39,7 @@ describe MainNavigation::InstructeurExpertNavigationComponent, type: :component
it 'render have Avis link' do
expect(subject).to have_link('Avis', href: component.helpers.expert_all_avis_path)
expect(subject).not_to have_selector('a[aria-current="page"]', text: 'Avis')
expect(subject).not_to have_selector('a[aria-current="true"]', text: 'Avis')
end
end
@ -65,7 +65,7 @@ describe MainNavigation::InstructeurExpertNavigationComponent, type: :component
it 'renders a link to expert all avis with current page class' do
expect(subject).to have_link('Avis', href: component.helpers.expert_all_avis_path)
expect(subject).to have_selector('a[aria-current="page"]', text: 'Avis')
expect(subject).to have_selector('a[aria-current="true"]', text: 'Avis')
expect(subject).not_to have_selector('span.badge')
end
@ -86,7 +86,7 @@ describe MainNavigation::InstructeurExpertNavigationComponent, type: :component
it 'render have Démarches link' do
expect(subject).to have_link('Démarches', href: component.helpers.instructeur_procedures_path)
expect(subject).not_to have_selector('a[aria-current="page"]', text: 'Démarches')
expect(subject).not_to have_selector('a[aria-current="true"]', text: 'Démarches')
end
end
end