Add autocomplete attribute to password fields

This helps the browser autocomplete them with the right thing.

Value based on https://www.w3.org/TR/WCAG21/#input-purposes
This commit is contained in:
Chris Hill-Scott
2019-07-16 17:01:54 +01:00
parent 30eeaec154
commit 92ea5894bb
9 changed files with 24 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ def test_render_register_returns_template_with_form(client):
assert page.find('input', attrs={'name': 'auth_type'}).attrs['value'] == 'sms_auth'
assert page.select_one('#email_address')['spellcheck'] == 'false'
assert page.select_one('#email_address')['autocomplete'] == 'email'
assert page.select_one('#password')['autocomplete'] == 'new-password'
assert 'Create an account' in response.get_data(as_text=True)