Jump to content

Account creation user experience/Strings/Experiment

From mediawiki.org

There are various classes of strings that account creation might display:

  • hardcoded English in the JavaScript that "munges" the form into the new appearance
  • the huge chunk of text in the new benefits section. This is currently hardcoded in the JavaScript, may be movable to a MediaWiki: message
  • error messages from the existing form that appear when you submit
  • messages ACUX shows on validation
  • other internal text

Hardcoded English in the JS

[edit]

Do we have to worry about these for the test?

Messages ACUX shows on validation

[edit]

Existing MW messages

[edit]

MW has messages similar to what we want, or we can have our own variations.

Reusing from UserLogin form itself

'password-name-match'   => 'Your password must be different from your username.',
'badretype' => 'The passwords you entered do not match.',
'noname'  => 'You have not specified a valid username.',


Reusing these messages from Special:ChangeEmail form

'email-address-validity-valid'   => 'E-mail address appears valid',
'email-address-validity-invalid' => 'Enter a valid e-mail address',

Reusing error returned by User.php

'passwordtooshort' => 'Passwords must be at least $1 characters.',

Reusing from somewhere

 'userexists'                 => 'Username entered already in use.

too wordy? Extension:SignupAPI is just "User exists"

New messages needed

[edit]

Rejected messages

[edit]

While validating the username, the server API could tell us what the username will be, e.g. "steven" -> "Steven". I can inform the user with something like

 'Username OK, will be Steven'
We decided not to show this info to user.

When user tabs out of username field without entering anything and it goes red

 "Username required" or "Username cannot be blank" ? or just "*" ?
  • there is a generic
 'htmlform-required'            => 'This value is required',
We decided to do nothing, the form placeholder text "Enter a desired username" is enough.

When blank name is submitted for validation (should never happen?)

'signupapi-noname' => 'No username was specified',
  • just reuse "Username required" from above?

Messages from extensions

[edit]

Extensions reject many usernames at account creation. The main way they do so is by hooking into AbortNewAccount ( 23 extensions do so someone please make a list of which of these are in use on enwiki). Many return an arbitrarily long and complex HTML message containing links and lists. These seem incompatible with a tooltip, unclear what to show, whether to have a shorter tooltip message, where the longer message goes, etc. Here are a few of these messages

AntiSpoof

[edit]
   'antispoof-conflict-top'  => 'The name "$1" is too similar to the following $2 accounts:',
   ... ... ...
   'antispoof-conflict-bottom' => 'Please choose another name.',

TitleBlacklist

[edit]
 'titleblacklist-forbidden-new-account' => 

'The user name "$2" has been banned from creation. It matches the following blacklist entry: $1' enwiki message is much longer, en:MediaWiki:Titleblacklist-forbidden-new-account

CentralAuth

[edit]

TBD

Other internal text

[edit]

'Invalid value for user parameter name'

comes from MW API when name does not look like a name (fails Title::makeTitleSafe). Not localized.
  • I propose not showing API failure messages to user, and just a generic "I <error code="baduser_name" info="Invalid value for user parameter name" nvalid username"


Testing for these strings

[edit]
See also Account creation user experience/Strings/Testing and Account creation user experience/Strings/Usernames

You can generate the API messages by invoking the wiki's API in a URL

api.php?action=e3acux&do=ac_validate&password=
  • Password too short
api.php?action=e3acux&do=ac_validate&name=Admin
  • name in use
api.php?action=e3acux&do=ac_validate&name=%23bad
  • bad name (starts with #, note have to encode this in URL)
api.php?action=e3acux&do=ac_validate&name=bad%23bad
  • bad name (# in middle)
api.php?action=e3acux&do=ac_validate&name=bad@bad
  • bad name (@ in it)
api.php?action=e3acux&do=ac_validate&name=/bad
  • bad name
api.php?action=e3acux&do=ac_validate&name=ThisNameIsOK 
  • OK name
api.php?action=e3acux&do=ac_validate&password=SomePassword
  • OK password