-
Notifications
You must be signed in to change notification settings - Fork 1
Name
– User needs
– How it works
– Services where this pattern is used
– Status
– Error messages
– Accessibility statement
– Code examples
– Research into this pattern
– Link to next related pattern
– Date of creation + review date
– Discuss this pattern
This pattern was created to make it as easy as possible for a user to enter their name. Use this pattern each time you need to ask for a user’s name as part of the service. You must only ask for people’s names if you need that information to deliver a service.
Use multiple fields to ask for a user’s name. Multiple name fields can accommodate a broad range of name types and means you can reliably extract parts of a name. The fields must be long enough to accommodate the users’ name, use data about existing users to do this.
Use:
- ‘Title’
- ‘First name’
- ‘Last name’
Try and avoid asking for a person’s title, it’s extra work for the user, and you’re asking them to potentially reveal their gender or marital status.
For some services, the title is mandatory as the backend system requires it.
When using a title, it must be an open text box to allow the user to enter their content.
Use the autocomplete attribute when asking for a user’s name. This lets browsers autofill the information on a user’s behalf if they’ve entered it previously.
If you are asking users to enter their name in multiple fields, set the autocomplete attribute on both fields using:
- For fields labelled ‘First name’
- For fields labelled ‘Last name’
Sometimes, browsers will spellcheck the information a user enters into a text input. To make sure the user’s names will not be spellchecked, set the spellcheck attribute to false.
Please click the link to explore what service this pattern is used in: Link-to-master-file.
Working progress
- Check the postcode and try again
This pattern has a rating of: AA
Accessibility testing is the process of testing the pattern for ease of use with specific disabilities. Please see our accessibility guidelines.
To make it AAA, we need to:
- Add...
<div class="govuk-form-group govuk-form-group--error">
<label class="govuk-label" for="address-postcode">
Postcode
</label>
<span id="address-postcode-error" class="govuk-error-message">
<span class="govuk-visually-hidden">Error:</span> Check the postcode and try again
</span>
<input class="govuk-input govuk-input--width-10 govuk-input--error" id="address-postcode" name="address-postcode" type="text" value="Not a postcode" aria-describedby="address-postcode-error" autocomplete="postal-code">
</div>This pattern was created ..** and will be review ..**
Design
[User Details]Add/remove person
Address picker
Name
Phone and email
[Check]
Report an asset
[Track]
Book
[Order]
Pay
[Success page and Error messages]
[Manage]
[Notify]
Service
[User Details][Check]
[Report]
[Track]
Book
[Order]
[Pay]
[Success page and Error messages]
[Manage]
[Notify]