demarches-normaliennes/app/views/users/registrations/new.html.haml
Martin a4d6692bc6 accessibilite(pages-authentification): evolutions des pages de connexion/creation de compte pour respecter le DSFR et supporter une meilleure accessibilite
Update app/components/dsfr/input_component/input_component.html.haml

Co-authored-by: Colin Darie <colin@darie.eu>
2023-01-03 16:26:05 +01:00

27 lines
1.4 KiB
Text

= content_for(:page_id, 'auth')
.auth-form
= devise_error_messages!
= form_for resource, url: user_registration_path, html: { class: "fr-py-5w" } do |f|
%h1.fr-h2= t('views.registrations.new.title', name: APPLICATION_NAME)
= render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }
%fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'create-account-legend' } }
%legend.fr-fieldset__legend#create-account-legend
%h2.fr-h6= I18n.t('views.registrations.new.subtitle')
.fr-fieldset__element
%p.fr-text--sm= t('utils.asterisk_html')
.fr-fieldset__element= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { autocomplete: 'email', autofocus: true })
.fr-fieldset__element
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, opts: { autocomplete: 'new-password', min_length: PASSWORD_MIN_LENGTH }) do |c|
- c.describedby do
#password-input-messages.fr-messages-group{ "aria-live" => "off" }
%p#password-input-message.fr-message= t('views.registrations.new.password_message')
%p#password-input-message-info.fr-message.fr-message--info= t('views.registrations.new.password_placeholder', min_length: PASSWORD_MIN_LENGTH)
= f.submit t('views.shared.account.create'), class: "fr-btn fr-btn--lg"