Skip to content

Commit

Permalink
Accessibilité: Hiérarchie des titres de la page « recherche structure »
Browse files Browse the repository at this point in the history
9.1 - Majeur : Présence d’un titre de hiérarchie simulé
8.9 - Mineur : Absence de balise à valeur sémantique
  • Loading branch information
etienneCharignon committed Dec 2, 2024
1 parent a3526b2 commit 0235865
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
background-image: image-url('punaise-recherche.svg');
}
}
.description-liste-structures {

h3.description-liste-structures {
@include texte;
margin-bottom: 1rem;
color: $eva_main_blue;
font-family: $font-texte;
font-weight: normal;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.infos {
max-width: 16.25rem;
.sous-infos {
margin-top: .75rem;
margin: .75rem 0 0 0;
font-size: .75rem;
}
}
Expand Down
46 changes: 22 additions & 24 deletions app/assets/stylesheets/admin/pages/_logged_out.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ body.logged_out {
font-size: .875rem;
background-color: $eva_light;

h2 {
padding: 0;
margin: 0 0 1.125rem;;
font-size: 1.125rem;
font-family: $font-titre;
text-shadow: none;
box-shadow: none;
color: $grey-50;
background: none;
}

h3 {
@include titre-carte;
font-size: 1.25rem;
line-height: 1.5rem;
margin-bottom: 1.25rem;
padding: 0;
+ .description {
margin-bottom: 0;
}
}

#wrapper {
flex-direction: column;
display: flex;
Expand Down Expand Up @@ -81,30 +103,6 @@ body.logged_out {
}
}

h2 {
padding: 0;
margin: 0 0 1.125rem;;
font-size: 1.125rem;
font-family: $font-titre;
text-shadow: none;
border-top-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
box-shadow: none;
color: $grey-50;
background: none;
}

h3 {
@include titre-carte;
font-size: 1.25rem;
line-height: 1.5rem;
margin-bottom: 1.25rem;
padding: 0;
+ .description {
margin-bottom: 0;
}
}

.panels-login {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down
4 changes: 2 additions & 2 deletions app/components/recherche_structure_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<% if @ville_ou_code_postal.present? %>
<% if @structures_code_postal.present? %>
<p class="description-liste-structures mt-4"><%= @structures_code_postal.size %> résultat(s) pour <%= @code_postal %></p>
<h3 class="description-liste-structures mt-4"><%= t('.titre_resultats', count: @structures_code_postal.size, code_postal: @code_postal) %></h3>
<% @structures_code_postal.each do |structure| %>
<%= render(RejoindreStructureComponent.new(structure, @current_compte)) %>
<% end %>
Expand All @@ -19,7 +19,7 @@
<% end %>

<% if @structures.present? %>
<p class="description-liste-structures mt-4">Structures à proximité</p>
<h3 class="description-liste-structures mt-4"><%= t('.titre_resultats_proches', count: @structures.size) %></h3>
<% @structures.each do |structure| %>
<%= render(RejoindreStructureComponent.new(structure, @current_compte)) %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/rejoindre_structure_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="rejoindre-structure">
<div class="infos" id="<%= @structure.id %>" >
<h4><%= @structure.nom %></h4>
<div class="sous-infos"><strong><%= t('.code_postal') %></strong><%= @structure.code_postal %></div>
<p class="sous-infos"><strong><%= t('.code_postal') %></strong><%= @structure.code_postal %></p>
</div>
<% if @current_compte.present? %>
<%= link_to t('.rejoindre_structure'),
Expand Down
2 changes: 1 addition & 1 deletion app/views/active_admin/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= resource.structure&.nom -%>
<% end %>
<div id="login" class="panel">
<%= link_to t('.lien_retour'),
<%= link_to t('structures.index.title'),
structures_path(
code_postal: params[:code_postal],
ville_ou_code_postal: params[:ville_ou_code_postal]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div class="col col-8 panel">
<h2><%= t('.titre') %></h2>
<p><%= t('.message_accueil') %></p>
<%= render(@recherche_structure_component) %>
</div>
3 changes: 3 additions & 0 deletions app/views/structures/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<% content_for :titre do %>
<%= t('.titre') -%>
<% end %>
<% content_for :sous_titre do %>
<%= t('.title') -%>
<% end %>

<%= link_to t('.lien_retour'),
new_compte_session_path,
Expand Down
8 changes: 8 additions & 0 deletions config/locales/components/recheche_structure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ fr:
bouton_recherche_structure: Chercher
label_champ_recherche: Entrez la localisation de la structure
placeholder_recherche: Code postal ou ville
titre_resultats:
zero: ""
one: "1 résultat pour %{code_postal}"
other: "%{count} résultats pour %{code_postal}"
titre_resultats_proches:
zero: ""
one: Structure à proximité
other: Structures à proximité
1 change: 0 additions & 1 deletion config/locales/views/recherche_structure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ fr:
admin:
recherche_structure:
recherche_structure:
titre: Quelle est votre structure ?
message_accueil: Avant de pouvoir commencer à utiliser eva en tant que conseiller ou conseillère, vous devez retrouver votre structure pour la rejoindre.
2 changes: 1 addition & 1 deletion config/locales/views/structures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ fr:
index:
title: Rechercher ma structure
titre: Bienvenue !
sous_titre: Rechercher ma structure
description: |
**Vous souhaitez créer un compte conseiller eva.**
Dans un premier temps merci de regarder si votre structure est déjà enregistrée.
Expand Down Expand Up @@ -63,5 +64,4 @@ fr:
**Veuillez vérifier les informations saisies avant de valider votre inscription.**
Si vous avez des difficultés, vous pouvez nous contacter à : [%{email_contact}](mailto:%{email_contact})
creer_structure: Valider la création de mon compte
lien_retour: Rechercher ma structure
description_lien_retour: Retour à la recherche de structure

0 comments on commit 0235865

Please sign in to comment.