From 3962c24892acf124bfb5ff972f3732aa430eff49 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Mon, 5 Aug 2024 17:19:11 +0200 Subject: [PATCH 01/10] Empty alt attribute for decorative images --- app/views/shared/_procedure_description.html.haml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/shared/_procedure_description.html.haml b/app/views/shared/_procedure_description.html.haml index e1cce58eb..82a0c2ba9 100644 --- a/app/views/shared/_procedure_description.html.haml +++ b/app/views/shared/_procedure_description.html.haml @@ -1,8 +1,5 @@ .procedure-logos - - procedure_logo_alt = '' - - if procedure.service.present? - - procedure_logo_alt = "#{procedure.service.nom} − #{procedure.service.organisme}" - = image_tag procedure.logo_url, alt: procedure_logo_alt + = image_tag procedure.logo_url, alt: '' - if procedure.euro_flag = image_tag("flag_of_europe.svg", id: 'euro_flag', class: (!procedure.euro_flag ? "hidden" : "")) %h1.fr-h2 From b301ad910911246fd4693c462b9c821b2f8a9032 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Mon, 5 Aug 2024 17:20:32 +0200 Subject: [PATCH 02/10] Hide decorative content from TA --- app/views/shared/_procedure_description.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_procedure_description.html.haml b/app/views/shared/_procedure_description.html.haml index 82a0c2ba9..2b6bd2593 100644 --- a/app/views/shared/_procedure_description.html.haml +++ b/app/views/shared/_procedure_description.html.haml @@ -8,7 +8,7 @@ - if procedure.persisted? && procedure.estimated_duration_visible? %p %small - %span.fr-icon-timer-line + %span.fr-icon-timer-line{ "aria-hidden" => "true" } = t('shared.procedure_description.estimated_fill_duration', estimated_minutes: estimated_fill_duration_minutes(procedure)) - if procedure.auto_archive_on From 5d6c97eb2f9feec305edd36e5f8f9c07fb8d466e Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 7 Aug 2024 11:22:52 +0200 Subject: [PATCH 03/10] Replace p.fr-callout__text with div to avoid unauthorised nesting --- app/views/commencer/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/commencer/show.html.haml b/app/views/commencer/show.html.haml index 545789f98..609a61409 100644 --- a/app/views/commencer/show.html.haml +++ b/app/views/commencer/show.html.haml @@ -3,7 +3,7 @@ .commencer.form - if !user_signed_in? = render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c| - - c.with_body do + - c.with_html_body do = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) } %ul.fr-btns-group.fr-btns-group--inline %li From aa0e469dc5337715120f4b21859b63855eb4914a Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 7 Aug 2024 11:54:55 +0200 Subject: [PATCH 04/10] Replace h2 with h3 in france connect component --- app/views/shared/_france_connect_login.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_france_connect_login.html.haml b/app/views/shared/_france_connect_login.html.haml index 688f2a2cc..5f61aef40 100644 --- a/app/views/shared/_france_connect_login.html.haml +++ b/app/views/shared/_france_connect_login.html.haml @@ -1,6 +1,6 @@ - if FranceConnectService.enabled? .france-connect-login - %h2.fr-h6 + %h3.fr-h6 = t('views.shared.france_connect_login.title') %p = t('views.shared.france_connect_login.description') From 019b1e389f2a5c75d6945a75394fb05f2015c8f7 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 7 Aug 2024 14:49:59 +0200 Subject: [PATCH 05/10] Add missing h2 to footer --- app/views/users/_procedure_footer.html.haml | 1 + config/locales/links.en.yml | 1 + config/locales/links.fr.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/app/views/users/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml index 8381b93c6..2cd27333b 100644 --- a/app/views/users/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -1,6 +1,7 @@ %footer.fr-footer.footer-procedure#footer{ role: "contentinfo" } .fr-footer__top.fr-mb-0 .fr-container + %h2.sr-only= t("links.footer.top_labels.hidden_title_procedure") .fr-grid-row.fr-grid-row--start.fr-grid-row--gutters .fr-col-12.fr-col-sm-4.fr-col-md-4 = render partial: 'shared/dossiers/update_contact_information', locals: { dossier: dossier, procedure: procedure } diff --git a/config/locales/links.en.yml b/config/locales/links.en.yml index 4d4293426..1fa94d1e8 100644 --- a/config/locales/links.en.yml +++ b/config/locales/links.en.yml @@ -16,6 +16,7 @@ en: footer: top_labels: hidden_title: Useful links + hidden_title_procedure: Procedure information communication: Communication legals: Legal information resources: Resources diff --git a/config/locales/links.fr.yml b/config/locales/links.fr.yml index dd0c9ecc7..095363e27 100644 --- a/config/locales/links.fr.yml +++ b/config/locales/links.fr.yml @@ -18,6 +18,7 @@ fr: footer: top_labels: hidden_title: Liens pratiques + hidden_title_procedure: Informations sur la démarche communication: Communication legals: Informations légales resources: Ressources From acdd259e1d9c50df13e148c97f5f2753c65bb123 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 7 Aug 2024 16:13:54 +0200 Subject: [PATCH 06/10] Uniform title with link content --- app/helpers/conservation_de_donnees_helper.rb | 1 - app/views/users/_procedure_footer.html.haml | 2 +- config/locales/views/users/procedure_footer/en.yml | 3 +-- config/locales/views/users/procedure_footer/fr.yml | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/helpers/conservation_de_donnees_helper.rb b/app/helpers/conservation_de_donnees_helper.rb index 5a38b1347..562288d6a 100644 --- a/app/helpers/conservation_de_donnees_helper.rb +++ b/app/helpers/conservation_de_donnees_helper.rb @@ -10,7 +10,6 @@ module ConservationDeDonneesHelper def conservation_dans_ds(procedure) if procedure.duree_conservation_dossiers_dans_ds.present? I18n.t('users.procedure_footer.legals.data_retention', - application_name: Current.application_name, duree_conservation_dossiers_dans_ds: procedure.duree_conservation_dossiers_dans_ds) end end diff --git a/app/views/users/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml index 2cd27333b..79e514f41 100644 --- a/app/views/users/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -13,7 +13,7 @@ %ul.fr-footer__top-list - politiques.each do |politique| %li - = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__top-link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title")), **external_link_attributes do + = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__top-link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title", data_retention_title: politiques_conservation_de_donnees(procedure).join)), **external_link_attributes do = politique - if procedure.deliberation.attached? %li diff --git a/config/locales/views/users/procedure_footer/en.yml b/config/locales/views/users/procedure_footer/en.yml index 4d1632cca..3dade9a89 100644 --- a/config/locales/views/users/procedure_footer/en.yml +++ b/config/locales/views/users/procedure_footer/en.yml @@ -17,8 +17,7 @@ en: link: "See the procedure's stats" legals: header: "Legals" - data_retention: "%{application_name} : %{duree_conservation_dossiers_dans_ds} months" - data_retention_title: "Explanation of our data retention and archiving policy" + data_retention: "Data retention and archiving : %{duree_conservation_dossiers_dans_ds} months" terms: "Laws regarding this data collection" dpo: "Contact the Data Protection Officer" dematerialisation: diff --git a/config/locales/views/users/procedure_footer/fr.yml b/config/locales/views/users/procedure_footer/fr.yml index a238508b5..7e986ed53 100644 --- a/config/locales/views/users/procedure_footer/fr.yml +++ b/config/locales/views/users/procedure_footer/fr.yml @@ -17,9 +17,9 @@ fr: link: "Voir les statistiques de la démarche" legals: header: "Cadre juridique" - data_retention: "%{application_name} : %{duree_conservation_dossiers_dans_ds} mois" + data_retention: "Rétention et archivage des données : %{duree_conservation_dossiers_dans_ds} mois" data_retention_url: "https://doc.demarches-simplifiees.fr/pour-aller-plus-loin/archivage-longue-duree-des-demarches" - data_retention_title: "Explications sur notre politique de rétention et d’archivage des données" + data_retention_title: "%{data_retention_title}" terms: "Texte cadrant la demande d’information" dpo: "Contacter le Délégué à la Protection des Données" official_links: From 6cd91015cff9c2036d55466288de82a66d72de33 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 7 Aug 2024 17:39:13 +0200 Subject: [PATCH 07/10] Update spec file --- spec/helpers/conservation_de_donnees_helper_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/helpers/conservation_de_donnees_helper_spec.rb b/spec/helpers/conservation_de_donnees_helper_spec.rb index a7307984d..ff9319c79 100644 --- a/spec/helpers/conservation_de_donnees_helper_spec.rb +++ b/spec/helpers/conservation_de_donnees_helper_spec.rb @@ -4,9 +4,7 @@ RSpec.describe ConservationDeDonneesHelper, type: :helper do let(:procedure) { build(:procedure, duree_conservation_dossiers_dans_ds: dans_ds) } describe "politiques_conservation_de_donnees" do - let(:app_name) { "une superbe application" } - - before { Current.application_name = app_name } + let(:label) { "Rétention et archivage des données" } subject { politiques_conservation_de_donnees(procedure) } @@ -14,7 +12,7 @@ RSpec.describe ConservationDeDonneesHelper, type: :helper do let(:dans_ds) { 3 } let(:hors_ds) { 6 } - it { is_expected.to eq(["#{app_name} : 3 mois"]) } + it { is_expected.to eq(["#{label} : 3 mois"]) } end context "when the retention time is not set" do From c950925a575d3b30fc906453165f02174cd74f4f Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 8 Aug 2024 10:16:46 +0200 Subject: [PATCH 08/10] Distinguish links from content --- .../dossiers/_update_contact_information.html.haml | 4 ++-- app/views/users/_procedure_footer.html.haml | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/views/shared/dossiers/_update_contact_information.html.haml b/app/views/shared/dossiers/_update_contact_information.html.haml index 549f0fa22..b60d86032 100644 --- a/app/views/shared/dossiers/_update_contact_information.html.haml +++ b/app/views/shared/dossiers/_update_contact_information.html.haml @@ -10,12 +10,12 @@ %ul.fr-footer__top-list - if dossier.present? && dossier.messagerie_available? %li - = link_to I18n.t('users.procedure_footer.contact.in_app_mail.link'), messagerie_dossier_path(dossier), class: 'fr-footer__top-link' + = link_to I18n.t('users.procedure_footer.contact.in_app_mail.link'), messagerie_dossier_path(dossier), class: 'fr-footer__link' - elsif service.present? %li %span.fr-footer__top-link = I18n.t('users.procedure_footer.contact.email.link') - = link_to service.email, "mailto:#{service.email}", class: "fr-footer__top-link" + = link_to service.email, "mailto:#{service.email}", class: "fr-footer__link" - if service.present? - if service.telephone.present? || service.horaires.present? diff --git a/app/views/users/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml index 79e514f41..d4b149ec1 100644 --- a/app/views/users/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -13,30 +13,29 @@ %ul.fr-footer__top-list - politiques.each do |politique| %li - = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__top-link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title", data_retention_title: politiques_conservation_de_donnees(procedure).join)), **external_link_attributes do + = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title", data_retention_title: politiques_conservation_de_donnees(procedure).join)), **external_link_attributes do = politique - if procedure.deliberation.attached? %li - = link_to url_for(procedure.deliberation), rel: 'noopener', class: 'fr-footer__top-link' do + = link_to url_for(procedure.deliberation), rel: 'noopener', class: 'fr-footer__link' do = I18n.t("users.procedure_footer.legals.terms") - else %li - = link_to I18n.t("users.procedure_footer.legals.terms"), procedure.cadre_juridique, rel: 'noopener', class: 'fr-footer__top-link' + = link_to I18n.t("users.procedure_footer.legals.terms"), procedure.cadre_juridique, rel: 'noopener', class: 'fr-footer__link' - if procedure.lien_dpo.present? %li - = link_to url_or_email_to_lien_dpo(procedure), rel: 'noopener', class: 'fr-footer__top-link' do + = link_to url_or_email_to_lien_dpo(procedure), rel: 'noopener', class: 'fr-footer__link' do = I18n.t("users.procedure_footer.legals.dpo") %li - = link_to I18n.t('users.procedure_footer.contact.stats.link'), statistiques_path(procedure.path), class: 'fr-footer__top-link', rel: 'noopener' + = link_to I18n.t('users.procedure_footer.contact.stats.link'), statistiques_path(procedure.path), class: 'fr-footer__link', rel: 'noopener' .fr-col-12.fr-col-sm-4.fr-col-md-4 - unless procedure.close? %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.dematerialisation.header') .fr-download - %p - = link_to I18n.t('users.procedure_footer.dematerialisation.title_1'), commencer_dossier_vide_for_revision_path(procedure.active_revision), class: 'fr-footer__top-link fr-download__link' + = link_to I18n.t('users.procedure_footer.dematerialisation.title_1'), commencer_dossier_vide_for_revision_path(procedure.active_revision), download: 'true', class: 'fr-download__link' %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.support.header') .fr-footer__brand.fr-enlarge-link = link_to t("users.procedure_footer.dematerialisation.link"), title: t("users.procedure_footer.dematerialisation.alt"), class: "fr-footer__brand-link" do From 2c69f93eddb03f9530a0238fd8578e6e79cfe3ae Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 8 Aug 2024 10:24:15 +0200 Subject: [PATCH 09/10] Remove time slot from telephone link --- .../_update_contact_information.html.haml | 20 +++++++++---------- .../views/users/procedure_footer/en.yml | 12 +++++------ .../views/users/procedure_footer/fr.yml | 5 +++-- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/app/views/shared/dossiers/_update_contact_information.html.haml b/app/views/shared/dossiers/_update_contact_information.html.haml index b60d86032..a4abc0620 100644 --- a/app/views/shared/dossiers/_update_contact_information.html.haml +++ b/app/views/shared/dossiers/_update_contact_information.html.haml @@ -2,7 +2,7 @@ - service = dossier&.service || procedure.service - if service.present? %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header') - .fr-footer__top-link.fr-pb-2w + .fr-footer__top-link.fr-pb-3w %span{ lang: :fr }= service.pretty_nom %div{ lang: :fr } = render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'}) @@ -17,14 +17,12 @@ = I18n.t('users.procedure_footer.contact.email.link') = link_to service.email, "mailto:#{service.email}", class: "fr-footer__link" - - if service.present? - - if service.telephone.present? || service.horaires.present? + - if service.telephone.present? %li - - horaires = "#{I18n.t('users.procedure_footer.contact.schedule.prefix')}#{formatted_horaires(service.horaires)}" - - if service.telephone.present? - = link_to service.telephone_url, class: 'fr-footer__top-link' do - %p - = I18n.t('users.procedure_footer.contact.phone.link', service_telephone: service.telephone) - - if service.horaires.present? - %p - = horaires + %span.fr-footer__top-link + = I18n.t('users.procedure_footer.contact.phone.label') + = link_to I18n.t('users.procedure_footer.contact.phone.link', service_telephone: service.telephone), service.telephone_url, class: 'fr-footer__link' + + - if service.horaires.present? + %li + = "#{I18n.t('users.procedure_footer.contact.schedule.prefix')}#{formatted_horaires(service.horaires)}" diff --git a/config/locales/views/users/procedure_footer/en.yml b/config/locales/views/users/procedure_footer/en.yml index 3dade9a89..102b8a5f0 100644 --- a/config/locales/views/users/procedure_footer/en.yml +++ b/config/locales/views/users/procedure_footer/en.yml @@ -4,23 +4,23 @@ en: managed_by: header: 'This procedure is managed by' contact: - header: 'Ask a question about the procedure :' + header: 'Ask a question about the procedure' in_app_mail: link: "Direclty via the chat" email: - link: "Directly by email:" + link: "Directly by email: " phone: - link: 'By phone: %{service_telephone}' + label: 'By phone: ' schedule: - prefix: 'Hours : ' + prefix: 'Hours: ' stats: link: "See the procedure's stats" legals: header: "Legals" - data_retention: "Data retention and archiving : %{duree_conservation_dossiers_dans_ds} months" + data_retention: "Data retention and archiving: %{duree_conservation_dossiers_dans_ds} months" terms: "Laws regarding this data collection" dpo: "Contact the Data Protection Officer" - dematerialisation: + dematerialisation: header: Paperless title_1: Download the PDF form link: "https://www.transformation.gouv.fr/france-services" diff --git a/config/locales/views/users/procedure_footer/fr.yml b/config/locales/views/users/procedure_footer/fr.yml index 7e986ed53..557905380 100644 --- a/config/locales/views/users/procedure_footer/fr.yml +++ b/config/locales/views/users/procedure_footer/fr.yml @@ -8,9 +8,10 @@ fr: in_app_mail: link: "Directement par la messagerie" email: - link: "Directement par courriel :" + link: "Directement par courriel :" phone: - link: 'Par téléphone au %{service_telephone}' + label: 'Par téléphone au : ' + link: '%{service_telephone}' schedule: prefix: "Horaires d’ouverture : " stats: From 84fbb4c6ad6e05d2d0a12e02f66acd763a0abbad Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 23 Sep 2024 12:29:48 +0200 Subject: [PATCH 10/10] fix: heading level of france connect title depends on context --- app/views/commencer/show.html.haml | 2 +- app/views/shared/_france_connect_login.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/commencer/show.html.haml b/app/views/commencer/show.html.haml index 609a61409..3c5619bfb 100644 --- a/app/views/commencer/show.html.haml +++ b/app/views/commencer/show.html.haml @@ -4,7 +4,7 @@ - if !user_signed_in? = render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c| - c.with_html_body do - = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) } + = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3 } %ul.fr-btns-group.fr-btns-group--inline %li = link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do diff --git a/app/views/shared/_france_connect_login.html.haml b/app/views/shared/_france_connect_login.html.haml index 5f61aef40..2837e06e8 100644 --- a/app/views/shared/_france_connect_login.html.haml +++ b/app/views/shared/_france_connect_login.html.haml @@ -1,6 +1,6 @@ - if FranceConnectService.enabled? .france-connect-login - %h3.fr-h6 + = tag.public_send(local_assigns.fetch(:heading_level, :h2), class: "fr-h6") do = t('views.shared.france_connect_login.title') %p = t('views.shared.france_connect_login.description')