In T285398: Signup form hides fields and field names in mobile view (specifically https://gerrit.wikimedia.org/r/c/mediawiki/core/+/933621) the CSS for remember me was changed but the JS inside MobileFrontend (src/mobile.special.userlogin.scripts.js) was not updated to be server side rendered.
Steps to replicate the issue:
- Open Special:UserLogin on a phone (or pass query parameter useformat=mobile to force usage of MobileFrontend)
- Pay attention to the state of the "Keep me logged in" checkbox
What happens?:
It's akin to FOUC. The checkbox is not checked at First Contentful Paint (FCP), until mobile.special.userlogin.scripts.js gets executed by the base js. The script ticks the checkbox.
When the checkbox state suddenly changes, it can cause confusion as the user may be typing into the input box and does not notice it, or has already submitted the form through browser autocompletion. The user won't know whether the session will be remembered or not.
What should have happened instead?:
If the returned HTML can't set the state of the checkbox directly, the script should run earlier if possible so users won't see the initial unchecked state.
Software version: 1.47.0-wmf.22