diff --git a/app/components/instructeurs/activate_account_form_component/activate_account_form_component.html.haml b/app/components/instructeurs/activate_account_form_component/activate_account_form_component.html.haml index f3a324b20..c92729a6f 100644 --- a/app/components/instructeurs/activate_account_form_component/activate_account_form_component.html.haml +++ b/app/components/instructeurs/activate_account_form_component/activate_account_form_component.html.haml @@ -16,7 +16,7 @@ .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) #password_complexity = render PasswordComplexityComponent.new diff --git a/app/components/password_complexity_component/password_complexity_component.html.haml b/app/components/password_complexity_component/password_complexity_component.html.haml index e4813b617..21d95aeb2 100644 --- a/app/components/password_complexity_component/password_complexity_component.html.haml +++ b/app/components/password_complexity_component/password_complexity_component.html.haml @@ -1,6 +1,7 @@ -%div{ class: complexity_classes } +%div{ "aria-hidden":"true", class: complexity_classes } -%div{ class: alert_classes } - %h3.fr-alert__title= title +#password_hint{ class: alert_classes } + %h3.fr-alert__title{ "aria-live": "polite", "aria-atomic": "true" } + = title - if !success? = t(".hint_html") diff --git a/app/views/administrateurs/activate/new.html.haml b/app/views/administrateurs/activate/new.html.haml index c54d3dec2..0dca181ed 100644 --- a/app/views/administrateurs/activate/new.html.haml +++ b/app/views/administrateurs/activate/new.html.haml @@ -18,7 +18,7 @@ .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) #password_complexity = render PasswordComplexityComponent.new diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index f35c61eb3..4227eaea8 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -12,17 +12,19 @@ = f.hidden_field :reset_password_token - %fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'edit-password-legend' } } - %legend.fr-fieldset__legend#edit-password-legend + %fieldset.fr-mb-0.fr-fieldset + %legend.fr-fieldset__legend %h1.fr-h2= I18n.t('views.users.passwords.edit.subtitle') + .fr-fieldset__element + %p.fr-text--sm= t('utils.asterisk_html') + .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', minlength: PASSWORD_MIN_LENGTH, data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) do |c| - - c.with_describedby do - %div{ id: c.describedby_id } - #password_complexity - = render PasswordComplexityComponent.new + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) + + #password_complexity + = render PasswordComplexityComponent.new .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password_confirmation, input_type: :password_field, opts: { autocomplete: 'new-password' }) diff --git a/app/views/experts/avis/sign_up.html.haml b/app/views/experts/avis/sign_up.html.haml index e82fcc956..72d5da9ea 100644 --- a/app/views/experts/avis/sign_up.html.haml +++ b/app/views/experts/avis/sign_up.html.haml @@ -14,7 +14,7 @@ .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) #password_complexity = render PasswordComplexityComponent.new diff --git a/app/views/gestionnaires/activate/new.html.haml b/app/views/gestionnaires/activate/new.html.haml index 07ff36f96..5f91c40ea 100644 --- a/app/views/gestionnaires/activate/new.html.haml +++ b/app/views/gestionnaires/activate/new.html.haml @@ -18,7 +18,7 @@ .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) #password_complexity = render PasswordComplexityComponent.new diff --git a/app/views/users/registrations/new.html.haml b/app/views/users/registrations/new.html.haml index 5c5f85de2..cbefa0140 100644 --- a/app/views/users/registrations/new.html.haml +++ b/app/views/users/registrations/new.html.haml @@ -19,7 +19,7 @@ .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, - opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }}) + opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}}) #password_complexity = render PasswordComplexityComponent.new