feat(fix-aria-current-mainmenu) : Transform aria-current='page' into aria-current='true' when the current link targets several pages - fix #8559 #8135
This commit is contained in:
parent
12406643d9
commit
fd54c15144
3 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ class MainNavigation::InstructeurExpertNavigationComponent < ApplicationComponen
|
|||
end
|
||||
|
||||
def aria_current_for(page)
|
||||
{ current: page == current_page ? :page : nil }
|
||||
{ current: page == current_page ? true : nil }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%nav#header-navigation.fr-nav{ role: 'navigation', 'aria-label': 'Menu principal administrateur' }
|
||||
%ul.fr-nav__list
|
||||
%li.fr-nav__item= link_to 'Mes démarches', admin_procedures_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'administrateurs/procedures', action: :index) ? 'page' : nil
|
||||
%li.fr-nav__item= link_to 'Mes démarches', admin_procedures_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'administrateurs/procedures', action: :index) ? 'true' : nil
|
||||
- if Rails.application.config.ds_zonage_enabled
|
||||
%li.fr-nav__item= link_to 'Toutes les démarches', all_admin_procedures_path(zone_ids: :admin_default), class:'fr-nav__link', 'aria-current': current_page?(all_admin_procedures_path) ? 'page' : nil
|
||||
- if current_administrateur.groupe_gestionnaire_id
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
= link_to t('back', scope: [:layouts, :header]), url_for(:back), title: t('back_title', scope: [:layouts, :header]), class: 'fr-nav__link', "aria-controls" => "modal-header__menu"
|
||||
|
||||
%li.fr-nav__item
|
||||
= link_to t('files', scope: [:layouts, :header]), dossiers_path, class: 'fr-nav__link', aria: { current: current_page?(dossiers_path) ? 'page' : nil, controls: "modal-header__menu" }
|
||||
= link_to t('files', scope: [:layouts, :header]), dossiers_path, class: 'fr-nav__link', aria: { current: controller_name == 'dossiers' ? 'true' : nil, controls: "modal-header__menu" }
|
||||
|
|
Loading…
Reference in a new issue