fix(a11y): root title link more explicit + i18n

Closes #8050
This commit is contained in:
Colin Darie 2022-11-28 14:50:41 +01:00
parent a0a2504684
commit c55148f694
4 changed files with 9 additions and 5 deletions

View file

@ -72,13 +72,13 @@ module ApplicationHelper
def root_path_info_for_profile(nav_bar_profile)
case nav_bar_profile
when :administrateur
[admin_procedures_path, "Aller au panneau dadministration"]
[admin_procedures_path, t("admin", scope: "layouts.root_path_link_title")]
when :instructeur
[instructeur_procedures_path, 'Aller à la liste des démarches']
[instructeur_procedures_path, t("instructeur", scope: "layouts.root_path_link_title")]
when :user
[dossiers_path, 'Aller à la liste des dossiers']
[dossiers_path, t("user", scope: "layouts.root_path_link_title")]
else
[root_path, "Aller à la page daccueil"]
[root_path, t("default", scope: "layouts.root_path_link_title")]
end
end

View file

@ -24,7 +24,7 @@
.fr-header__service
- root_profile_link, root_profile_libelle = root_path_info_for_profile(nav_bar_profile)
= link_to root_profile_link, :title => root_profile_libelle do
= link_to root_profile_link, title: "#{root_profile_libelle} — #{APPLICATION_NAME}" do
%p.fr-header__service-title= APPLICATION_NAME
.fr-header__tools

View file

@ -84,6 +84,8 @@ en:
access: View your File
question: I have a question
reply: Reply to this message
root_path_link_title:
default: "Go to homepage"
views:
commencer:
show:

View file

@ -74,6 +74,8 @@ fr:
access: Consulter mon dossier
question: Jai une question
reply: Répondre à ce message
root_path_link_title:
default: "Aller à la page daccueil"
views:
commencer:
show: