Page MenuHomePhabricator

Autocomplete for username and passwords in Login and Signup forms
Closed, InvalidPublic

Description

Following on from T289086: Allow iOS/macOS/iPadOS to autofill 2fa codes, we should improve/set the autocomplete values for usernames and passwords on the Login and signup forms

https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element

Use the following autocomplete attribute values:

CredentialAutocomplete Values
User Nameusername
Passwordcurrent-password
New Passwordnew-password
One-Time Codeone-time-code

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

Event Timeline

Doing a quick search in the code (for core), it looks like we pretty much already use these values for autocomplete.

It looks like we do for registration, but not for the login form. So we should at least make it consistent...

Screenshot 2021-09-04 at 12.52.41.png (1×1 px, 456 KB)

Screenshot 2021-09-04 at 12.54.07.png (1×1 px, 649 KB)

The code for the login form does seem to set autocomplete values (https://github.com/wikimedia/mediawiki/blob/51b5edd2adb5b33d6cc042df2aae5175144a0640/includes/specialpage/LoginSignupSpecialPage.php#L905) but they don’t take effect on the login form I checked the web inspector for both wikipedia, and a different wiki, and I am seeing autocomplete values that are correct.

Closing as invalid, as when I look in the web console on Wikipedia as well as another wiki, and when I look at the MW code, I see that the correct autocomplete values are set.