You should follow this pattern when you need to ask for a user’s name and only ask for names if you need it for a service.
You should follow this pattern when you know that your users follow the given-name and family-name convention.
Name fields should be long enough to accomodate the names of your users. Do make sure that you support all characters that users may need to enter, including symbols and numbers.
Do ensure that you do not spellcheck a user's name by setting the
spellcheck attribute to
This can accomodate the widest range of name types and formats and is recommended to reduce the risk that your user's enter their name in the incorrect format. However by using this, you may not be able to extract parts of a name.
Use multiple name fields based on your user's needs. Not everyone's name fits the general first-name, last-name convention. Using multiple name fields increases the risk that a person's name will not fit the same convention and may be entered incorrectly.
For single name fields, use "Full name".
For multiple name fields, use:
Do make it clear whether you are asking for a user's common name, or as written on a official document such as NRIC or passport.
If you are unsure of how your users will fill in their name or know that you have a wide range of users with different formats for their names, it is highly recommended to use a single name field.
This is to ensure that your users:
Do use the
autocomplete attribute when asking for a user's name. This makes it easier
for the user to fill in their name if they have done so previously on the browser.
You will need to include the
autocomplete attribute to meet
WCAG 2.1 AA
Having troubles with the guide? Please give us more details and we'll get back to you soon.Chat with the team