Améliorations diverses sur l'accessibilité (#4530)

Usager : améliorations diverses sur l'accessibilité
This commit is contained in:
Pierre de La Morinerie 2019-11-20 11:23:33 +01:00 committed by GitHub
commit ac69c89a03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 62 additions and 54 deletions

View file

@ -130,6 +130,10 @@
} }
} }
.state-button {
display: inline-block;
}
.dropdown { .dropdown {
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -213,10 +217,13 @@
} }
} }
&.selected, &:not(.inactive) {
&:hover:not(.inactive) {
background: $light-grey;
cursor: pointer; cursor: pointer;
&:hover,
&.selected {
background: $light-grey;
}
} }
&.danger { &.danger {

View file

@ -150,6 +150,8 @@ $header-mobile-breakpoint: 550px;
} }
button { button {
@extend %outline;
padding: 9px; padding: 9px;
border: none; border: none;
background: none; background: none;

View file

@ -1,5 +1,5 @@
%span.dropdown.print-menu-opener %span.dropdown.print-menu-opener
%button.button.dropdown-button.icon-only %button.button.dropdown-button.icon-only{ title: 'imprimer' }
%span.icon.printer %span.icon.printer
%ul.print-menu.dropdown-content %ul.print-menu.dropdown-content
%li %li
@ -20,5 +20,5 @@
= render partial: "instructeurs/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_instructeur&.follow?(dossier) } = render partial: "instructeurs/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_instructeur&.follow?(dossier) }
%span.state-button .state-button
= render partial: "state_button", locals: { dossier: dossier } = render partial: "state_button", locals: { dossier: dossier }

View file

@ -1,4 +1,4 @@
%span.dropdown .dropdown
-# Dropdown button title -# Dropdown button title
%button.button.primary.dropdown-button{ class: button_or_label_class(dossier) } %button.button.primary.dropdown-button{ class: button_or_label_class(dossier) }
= dossier_display_state dossier = dossier_display_state dossier

View file

@ -1,4 +1,4 @@
%span.dropdown.invite-user-action .dropdown.invite-user-action
%button.button.dropdown-button %button.button.dropdown-button
%span.icon.person %span.icon.person
- if dossier.invites.count > 0 - if dossier.invites.count > 0

View file

@ -1,4 +1,4 @@
%span.dropdown.header-menu-opener .dropdown.header-menu-opener
%button.button.dropdown-button.header-menu-button %button.button.dropdown-button.header-menu-button
= image_tag "icons/account-circle.svg", title: "Mon compte" = image_tag "icons/account-circle.svg", title: "Mon compte"
%ul.header-menu.dropdown-content %ul.header-menu.dropdown-content
@ -8,30 +8,30 @@
- if administration_signed_in? - if administration_signed_in?
%li %li
= link_to manager_root_path, class: "menu-item menu-link" do = link_to manager_root_path, class: "menu-item menu-link" do
= image_tag "icons/super-admin.svg" = image_tag "icons/super-admin.svg", alt: ''
Passer en super-admin Passer en super-admin
- if multiple_devise_profile_connect? - if multiple_devise_profile_connect?
- if user_signed_in? && nav_bar_profile != :user - if user_signed_in? && nav_bar_profile != :user
%li %li
= link_to dossiers_path, class: "menu-item menu-link" do = link_to dossiers_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg" = image_tag "icons/switch-profile.svg", alt: ''
Passer en usager Passer en usager
- if instructeur_signed_in? && nav_bar_profile != :instructeur - if instructeur_signed_in? && nav_bar_profile != :instructeur
%li %li
= link_to instructeur_procedures_path, class: "menu-item menu-link" do = link_to instructeur_procedures_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg" = image_tag "icons/switch-profile.svg", alt: ''
Passer en instructeur Passer en instructeur
- if administrateur_signed_in? && nav_bar_profile != :administrateur - if administrateur_signed_in? && nav_bar_profile != :administrateur
%li %li
= link_to admin_procedures_path, class: "menu-item menu-link" do = link_to admin_procedures_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg" = image_tag "icons/switch-profile.svg", alt: ''
Passer en administrateur Passer en administrateur
%li %li
= link_to profil_path, class: "menu-item menu-link" do = link_to profil_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg" = image_tag "icons/switch-profile.svg", alt: ''
Voir mon profil Voir mon profil
%li %li
= link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do = link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do
= image_tag "icons/sign-out.svg" = image_tag "icons/sign-out.svg", alt: ''
Se déconnecter Se déconnecter

View file

@ -38,7 +38,7 @@
= form_tag instructeur_recherche_path, method: :get, class: "form" do = form_tag instructeur_recherche_path, method: :get, class: "form" do
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: "Rechercher un dossier" = text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: "Rechercher un dossier"
%button{ title: "Rechercher" } %button{ title: "Rechercher" }
= image_tag "icons/search-blue.svg" = image_tag "icons/search-blue.svg", alt: ''
- if nav_bar_profile == :user && user_signed_in? && current_user.dossiers.count > 2 - if nav_bar_profile == :user && user_signed_in? && current_user.dossiers.count > 2
%li %li
@ -46,7 +46,7 @@
= form_tag recherche_dossiers_path, method: :post, class: "form" do = form_tag recherche_dossiers_path, method: :post, class: "form" do
= text_field_tag :dossier_id, "", placeholder: "Numéro de dossier" = text_field_tag :dossier_id, "", placeholder: "Numéro de dossier"
%button{ title: "Rechercher" } %button{ title: "Rechercher" }
= image_tag "icons/search-blue.svg" = image_tag "icons/search-blue.svg", alt: ''
- if instructeur_signed_in? || user_signed_in? - if instructeur_signed_in? || user_signed_in?
%li %li
@ -60,7 +60,6 @@
= link_to "Connexion", new_user_session_path, class: "button secondary" = link_to "Connexion", new_user_session_path, class: "button secondary"
%li %li
.header-help
- if dossier.present? && nav_bar_profile == :user - if dossier.present? && nav_bar_profile == :user
= render partial: 'shared/help/help_dropdown_dossier', locals: { dossier: dossier } = render partial: 'shared/help/help_dropdown_dossier', locals: { dossier: dossier }

View file

@ -16,7 +16,7 @@
%th.libelle{ class: repetition ? 'padded' : '' } %th.libelle{ class: repetition ? 'padded' : '' }
= "#{c.libelle} :" = "#{c.libelle} :"
%td.rich-text %td.rich-text
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) } %div{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
- case c.type_champ - case c.type_champ
- when TypeDeChamp.type_champs.fetch(:carte) - when TypeDeChamp.type_champs.fetch(:carte)
= render partial: "shared/champs/carte/show", locals: { champ: c } = render partial: "shared/champs/carte/show", locals: { champ: c }

View file

@ -7,7 +7,7 @@
%div %div
= f.file_field :piece_jointe, id: 'piece_jointe', direct_upload: true = f.file_field :piece_jointe, id: 'piece_jointe', direct_upload: true
%label{ for: :piece_jointe } %label{ for: :piece_jointe }
.notice %span.notice
(taille max : 20 Mo) (taille max : 20 Mo)
%div %div

View file

@ -1,7 +1,7 @@
- if commentaire.sent_by_system? - if commentaire.sent_by_system?
= image_tag('icons/mail.svg', class: 'person-icon') = image_tag('icons/mail.svg', class: 'person-icon', alt: '')
- elsif commentaire.sent_by?(connected_user) - elsif commentaire.sent_by?(connected_user)
= image_tag('icons/account-circle.svg', class: 'person-icon') = image_tag('icons/account-circle.svg', class: 'person-icon', alt: '')
- else - else
= image_tag('icons/blue-person.svg', class: 'person-icon') = image_tag('icons/blue-person.svg', class: 'person-icon', alt: '')

View file

@ -1,5 +1,5 @@
.dropdown.help-dropdown .dropdown.help-dropdown
.button.primary.dropdown-button Aide %button.button.primary.dropdown-button Aide
.dropdown-content.fade-in-down .dropdown-content.fade-in-down
%ul.dropdown-items %ul.dropdown-items
- title = dossier.brouillon? ? "Besoin daide pour remplir votre dossier ?" : "Une question sur votre dossier ?" - title = dossier.brouillon? ? "Besoin daide pour remplir votre dossier ?" : "Une question sur votre dossier ?"

View file

@ -1,5 +1,5 @@
.dropdown.help-dropdown .dropdown.help-dropdown
.button.primary.dropdown-button Aide %button.button.primary.dropdown-button Aide
.dropdown-content.fade-in-down .dropdown-content.fade-in-down
%ul.dropdown-items %ul.dropdown-items
= render partial: 'shared/help/dropdown_items/faq_item' = render partial: 'shared/help/dropdown_items/faq_item'

View file

@ -4,7 +4,7 @@
- has_actions = has_delete_action || has_new_dossier_action - has_actions = has_delete_action || has_new_dossier_action
- if has_actions - if has_actions
%span.dropdown.user-dossier-actions .dropdown.user-dossier-actions
%button.button.dropdown-button %button.button.dropdown-button
Actions Actions
.dropdown-content.fade-in-down .dropdown-content.fade-in-down

View file

@ -13,7 +13,7 @@
.auth-options .auth-options
%div %div
= f.check_box :remember_me, as: :boolean = f.check_box :remember_me
= f.label :remember_me, "Se souvenir de moi", class: 'remember-me' = f.label :remember_me, "Se souvenir de moi", class: 'remember-me'
.text-right .text-right