Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Indicate password requirements on sign up form #42

Closed digitalWestie closed 5 years ago

digitalWestie commented 5 years ago

Just a sentence beneath password. Perhaps check django user docs for confirmation it's just 8 characters required.

Mike-Heneghan commented 5 years ago

Need to add the password requirements somewhere logical.

screenshot 2019-02-18 at 17 34 58
Mike-Heneghan commented 5 years ago

Finding it hard to pin down the password requirements although it seems to be a minimum of 8 characters.

Mike-Heneghan commented 5 years ago

Trying to do a bit of research for user experience best practices with password creation.

https://www.nngroup.com/articles/password-creation/

Mike-Heneghan commented 5 years ago

Tried to use the error style boxes to give the password requirements although struggling to unpick the way it's being handled.

Mike-Heneghan commented 5 years ago

Experimented with trying to update the signup model password input fields to change the behaviour.

    password1 = forms.CharField(
        label="Password",
        strip=False,
        widget=forms.PasswordInput(attrs={
            'autocomplete': 'new-password',
        }),
        help_text='Minimum of 8 characters.',
    )

Unfortunately, the help_text isn't appearing. Need to continue experimenting.

Mike-Heneghan commented 5 years ago

Managed to get the help_text to display the password requirements as below:

screenshot 2019-02-21 at 09 35 29

The password requirements may not be obvious although if they appear when the user selects the field it might be clearer?

Also the autocomplete could is annoying because it autofills the postcode field withmy email address and a single blanked password. If the user is creating a new account they shouldn't have any autocomplete information?

Mike-Heneghan commented 5 years ago

Before the user clicks or tabs to the password field.

screenshot 2019-02-21 at 10 45 35

After the user click or tabs to the password field.

screenshot 2019-02-21 at 10 45 46

Had to add help_text to both fields otherwise, the formatting was off.

Also found that the help_text was clearer when above, otherwise it would be obscured by the autofill.

Also used .focus() rather than .click() as tabbing by accessibility users wouldn't show the password requirements.

Mike-Heneghan commented 5 years ago

With autocomplete settings unchanged:

screenshot 2019-02-21 at 11 23 44

With new password setting as below:

widget=forms.PasswordInput(attrs={
            'autocomplete': 'new-password',
        }),
screenshot 2019-02-21 at 11 24 19

I think this is a usability improvement as erroneously having the email in the postcode field is confusing as well as a hidden password populating which the user has to overwrite.

Mike-Heneghan commented 5 years ago

Merged into master.