From 1bdc0836a6a4a74b7be347cf1716a4f8a95b6346 Mon Sep 17 00:00:00 2001 From: clemkeirua Date: Mon, 23 Mar 2020 17:29:39 +0100 Subject: [PATCH] password length for screen reader on /users/sign_up We use a placeholder (which is not made for this, but we have reasons to do that) so using a visible labels or paragraph duplicates the information I picked aria-describedby, which is not the ideal solution (it seems to be aria-labelledby) but which is the most widely supported https://www.w3.org/WAI/tutorials/forms/instructions/#using-aria-describedby --- app/views/users/registrations/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/registrations/new.html.haml b/app/views/users/registrations/new.html.haml index 7a83cc034..e6602c9b5 100644 --- a/app/views/users/registrations/new.html.haml +++ b/app/views/users/registrations/new.html.haml @@ -20,7 +20,7 @@ Non = f.label :password, "Mot de passe" - = f.password_field :password, value: @user.password, placeholder: "8 caractères minimum" + = f.password_field :password, value: @user.password, placeholder: "8 caractères minimum", 'aria-describedby':'8 caractères minimum' = f.submit "Créer un compte", class: "button large primary expand"