Merge pull request from demarches-simplifiees/a11y-8181-messaging-input-control

a11y : add label textarea message
This commit is contained in:
Julie Salha 2023-01-25 12:51:51 +01:00 committed by GitHub
commit af6d167516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions
app
assets/stylesheets
views
shared/dossiers/messages
users/dossiers/show

View file

@ -30,7 +30,6 @@
color: $dark-red;
}
label,
legend.form-label {
font-size: 18px;
margin-bottom: $default-padding;
@ -198,9 +197,6 @@
input[type=tel],
textarea,
select {
border-radius: 4px;
border: solid 1px $border-grey;
padding: $default-padding;
&.small {
padding: $default-spacer;
@ -218,7 +214,7 @@
}
// Hide the browser default invalidity indicator until the field is touched
&:invalid:not(:focus) {
&:invalid:not(:focus):not(.fr-input) {
box-shadow: none;
}

View file

@ -3,12 +3,17 @@
- placeholder = t('views.shared.dossiers.messages.form.write_message_to_administration_placeholder')
- if instructeur_signed_in? || administrateur_signed_in? || expert_signed_in?
- placeholder = t('views.shared.dossiers.messages.form.write_message_placeholder')
= f.text_area :body, rows: 5, placeholder: placeholder, title: placeholder, required: true, class: 'message-textarea'
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
.fr-input-group
= label_tag :commentaire_body, class: 'fr-label' do
= t('message', scope: [:utils])
%span.mandatory *
= f.text_area :body, rows: 5, placeholder: placeholder, title: placeholder, required: true, class: 'fr-input message-textarea'
.flex.justify-between.wrap
- disable_piece_jointe = defined?(disable_piece_jointe) ? disable_piece_jointe : false
%div
- if !disable_piece_jointe
= render Attachment::EditComponent.new(attached_file: commentaire.piece_jointe)
%div
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'button primary send', data: { disable: true }
.send-wrapper.fr-my-3w
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn send', data: { disable: true }

View file

@ -1,4 +1,4 @@
%span.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
.dropdown.print-menu-opener{ data: { controller: 'menu-button' } }
%button.button.dropdown-button.icon-only{ title: t('views.users.dossiers.show.header.print'), 'aria-label': 'imprimer', data: { menu_button_target: 'button' } }
%span.icon.printer
%ul#print-menu.print-menu.dropdown-content{ data: { menu_button_target: 'menu' } }