Merge pull request #10838 from demarches-simplifiees/a11y-fix-password-security-alert
Ajoute la vocalisation du composant d'analyse de complexicité du mot de passe pour les technologies d'assistance
This commit is contained in:
commit
7dcb2fbe23
7 changed files with 18 additions and 15 deletions
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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
|
#password_complexity
|
||||||
= render PasswordComplexityComponent.new
|
= render PasswordComplexityComponent.new
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
%div{ class: complexity_classes }
|
%div{ "aria-hidden":"true", class: complexity_classes }
|
||||||
|
|
||||||
%div{ class: alert_classes }
|
#password_hint{ class: alert_classes }
|
||||||
%h3.fr-alert__title= title
|
%h3.fr-alert__title{ "aria-live": "polite", "aria-atomic": "true" }
|
||||||
|
= title
|
||||||
- if !success?
|
- if !success?
|
||||||
= t(".hint_html")
|
= t(".hint_html")
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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
|
#password_complexity
|
||||||
= render PasswordComplexityComponent.new
|
= render PasswordComplexityComponent.new
|
||||||
|
|
|
@ -12,17 +12,19 @@
|
||||||
= f.hidden_field :reset_password_token
|
= f.hidden_field :reset_password_token
|
||||||
|
|
||||||
|
|
||||||
%fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'edit-password-legend' } }
|
%fieldset.fr-mb-0.fr-fieldset
|
||||||
%legend.fr-fieldset__legend#edit-password-legend
|
%legend.fr-fieldset__legend
|
||||||
%h1.fr-h2= I18n.t('views.users.passwords.edit.subtitle')
|
%h1.fr-h2= I18n.t('views.users.passwords.edit.subtitle')
|
||||||
|
|
||||||
|
.fr-fieldset__element
|
||||||
|
%p.fr-text--sm= t('utils.asterisk_html')
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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|
|
opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }, aria: {describedby: 'password_hint'}})
|
||||||
- c.with_describedby do
|
|
||||||
%div{ id: c.describedby_id }
|
#password_complexity
|
||||||
#password_complexity
|
= render PasswordComplexityComponent.new
|
||||||
= render PasswordComplexityComponent.new
|
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password_confirmation, input_type: :password_field, opts: { autocomplete: 'new-password' })
|
= render Dsfr::InputComponent.new(form: f, attribute: :password_confirmation, input_type: :password_field, opts: { autocomplete: 'new-password' })
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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
|
#password_complexity
|
||||||
= render PasswordComplexityComponent.new
|
= render PasswordComplexityComponent.new
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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
|
#password_complexity
|
||||||
= render PasswordComplexityComponent.new
|
= render PasswordComplexityComponent.new
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
= 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
|
#password_complexity
|
||||||
= render PasswordComplexityComponent.new
|
= render PasswordComplexityComponent.new
|
||||||
|
|
Loading…
Reference in a new issue