Merge pull request #10682 from demarches-simplifiees/a11y-fix-process-screen-1
Corrige les défaut d'accessibilité de la page d'accueil d'une démarche
This commit is contained in:
commit
6800205ffe
11 changed files with 38 additions and 44 deletions
|
@ -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
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
.commencer.form
|
||||
- if !user_signed_in?
|
||||
= render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c|
|
||||
- c.with_body do
|
||||
= render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) }
|
||||
- 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), 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if FranceConnectService.enabled?
|
||||
.france-connect-login
|
||||
%h2.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')
|
||||
|
|
|
@ -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
|
||||
|
@ -11,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
|
||||
|
|
|
@ -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'})
|
||||
|
@ -10,21 +10,19 @@
|
|||
%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?
|
||||
- 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)}"
|
||||
|
|
|
@ -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 }
|
||||
|
@ -12,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")), **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
|
||||
|
|
|
@ -16,6 +16,7 @@ en:
|
|||
footer:
|
||||
top_labels:
|
||||
hidden_title: Useful links
|
||||
hidden_title_procedure: Procedure information
|
||||
communication: Communication
|
||||
legals: Legal information
|
||||
resources: Resources
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,24 +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: "%{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:
|
||||
dematerialisation:
|
||||
header: Paperless
|
||||
title_1: Download the PDF form
|
||||
link: "https://www.transformation.gouv.fr/france-services"
|
||||
|
|
|
@ -8,18 +8,19 @@ 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:
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue