Password complexity : Adds component vocalization for ATs

This commit is contained in:
Corinne Durrmeyer 2024-09-20 14:31:54 +02:00
parent 28b8c8bf84
commit 6f7e7f43d6
No known key found for this signature in database
GPG key ID: DDC049DDA35585B6
7 changed files with 13 additions and 13 deletions

View file

@ -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

View file

@ -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")

View file

@ -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

View file

@ -18,9 +18,8 @@
.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

View file

@ -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

View file

@ -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

View file

@ -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