correctif(a11y): #8107 (et d'autres), utilise le nouveau composant pour rendre les textes saisies par les admins accessible

This commit is contained in:
Martin 2023-02-22 05:59:10 +01:00 committed by mfo
parent 4d8b4e078b
commit 4fd799390b
6 changed files with 8 additions and 9 deletions

View file

@ -7,4 +7,4 @@
= render EditableChamp::ChampLabelContentComponent.new champ: @champ, seen_at: @seen_at
- if @champ.description.present?
.notice{ id: @champ.describedby_id }= string_to_html(@champ.description, allow_a: true)
.notice{ id: @champ.describedby_id }= render SimpleFormatComponent.new(@champ.description, allow_a: true)

View file

@ -2,7 +2,7 @@
- if @champ.block?
%h3.header-subsection= @champ.libelle
- if @champ.description.present?
%p.notice= string_to_html(@champ.description, false, allow_a: true)
.notice= render SimpleFormatComponent.new(@champ.description, allow_a: true)
- elsif has_label?(@champ)
= render EditableChamp::ChampLabelComponent.new form: @form, champ: @champ, seen_at: @seen_at

View file

@ -1,7 +1,7 @@
= render Dsfr::CalloutComponent.new(title: @champ.libelle, extra_class_names: ['fr-mb-2w', 'fr-callout--blue-cumulus']) do |c|
- c.with_body do
= string_to_html(@champ.description, allow_a: true)
= render SimpleFormatComponent.new(@champ.description, allow_a: true)
- if @champ.collapsible_explanation_enabled? && @champ.collapsible_explanation_text.present?
%div

View file

@ -8,7 +8,7 @@
= @form.label :secondary_value, for: "#{@champ.input_id}-secondary" do
- sanitize((@champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première") + (@champ.type_de_champ.mandatory? ? tag.span(' *', class: 'mandatory') : ''))
- if @champ.drop_down_secondary_description.present?
.notice{ id: "#{@champ.describedby_id}-secondary" }= string_to_html(@champ.drop_down_secondary_description, allow_a: true)
.notice{ id: "#{@champ.describedby_id}-secondary" }= render SimpleFormatComponent.new(@champ.drop_down_secondary_description, allow_a: true)
= @form.select :secondary_value,
@champ.secondary_options[@champ.primary_value],
{},

View file

@ -23,5 +23,5 @@
.procedure-description
.procedure-description-body.read-more-enabled.read-more-collapsed{ tabindex: "0", role: "region", "aria-label": t('views.users.dossiers.identite.description') }
= h string_to_html(procedure.description, allow_a: true)
= h render SimpleFormatComponent.new(procedure.description, allow_a: true)
= button_tag "Afficher la description complète", class: 'button read-more-button'

View file

@ -67,10 +67,9 @@
.fr-footer__content
%p.fr-footer__content-desc
= I18n.t('users.procedure_footer.managed_by.header')
%span{ lang: :fr }
= "#{service.nom},"
= "#{service.organisme},"
= string_to_html(service.adresse, 'span')
%div{ lang: :fr }
%p= "#{service.nom}, #{service.organisme},"
= render SimpleFormatComponent.new(service.adresse)
= render partial: "shared/footer_content_list"
.fr-footer__bottom