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
This commit is contained in:
clemkeirua 2020-03-23 17:29:39 +01:00 committed by GitHub Action
parent 5ef6f92fdc
commit 1bdc0836a6

View file

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