Skip to content
AnnaWalkerSMBC edited this page Jun 12, 2024 · 30 revisions

Contents

– User needs
– How it works
– Status
– Error messages
– Accessibility statement
– Examples
– Research into this pattern
– Discuss this pattern


User needs

Use this pattern when you need to ask for a user’s name as part of the service requirements. You must only ask for users' names if the service requires this information to deliver their service.


How it works

Follow the guidance on GOV.UK Design System - Ask users for Names for information on how to ask for names.

Labelling name fields

You could use:

  • ‘Title’
  • ‘First name’
  • ‘Last name’
  • ‘Full name’

When to use ‘Title’

Try and avoid asking for a person’s title.

For some services, the title is mandatory as the backend system requires it.

Follow the guidance on GOV.UK Design System - Ask users for Names and scroll to the section titled: 'Avoid asking for a person’s title' for information on why it should be avoided and how to ask for title if you have to ask for it.


When to use single or multiple name fields

Follow the guidance on GOV.UK Design System - Ask users for Names and scroll to the section titled: 'Single or multiple name fields' for information on when to use single or multiple name fields depending on the user needs or requirements.


An example for when to use ‘full name'

Example: Use ‘Full name’ when referring to names that users may not know both the first and last name. An example would be a key worker in Debt Advice when the user may not know both the key worker's first and last name (but it's part of the service's requirements) and they can still proceed through the form by just entering the part of the name that they know.


Use the autocomplete attribute on name fields

Use the autocomplete attribute when asking for a user’s name. Follow the guidance on GOV.UK Design System - Ask users for Names and scroll to the section titled: 'Use the autocomplete attribute on name fields' for information on using the autocomplete attribute on name fields.


Do not spellcheck user’s names

Browsers will sometimes spellcheck the information entered into a text input. Follow the guidance on GOV.UK Design System - Ask users for Names and scroll to the section titled: 'Do not spellcheck user’s names' for information on not using spellcheck for user’s names.


Status

Working progress


Error messages

Use an error message to identify when the user has not provided the information in the format you are expecting. To help the user, you should show an error message that allows them to fix the problem.

For styling follow GOV.UK Design System - Error message

Label Error state Error messages
First name If the text field is blank Enter [your/their] first name
Last name If the text field is blank Enter [your/their] last name

Accessibility statement

This pattern has a rating of AA.

Please see our accessibility statement.

Improvements

To make it AAA, we need to:

  • Add...

Examples

Axure mock-up - Name without title

Axure mock-up - Name with title

Axure mock-up - Full name


Research into this pattern

For the development of this pattern, we looked closely at:
GOV.UK Design System - Ask users for Names


Discuss this pattern