Skip to main content
Design system

Beta This is a new service. Your feedback will help us improve it.

Error summary

Updated in October 2026

Include an error summary at the top of a page to help users identify and fix mistakes they've made.

Your details

Error: Enter your full name

When to use an error summary

Include an error summary at the top of a page to summarise any mistakes a user has made.

When a user makes a mistake, you must show an error summary at the top of the page as well as an error message next to each answer that contains an error.

Always show an error summary when there is a validation error, even if there's only 1 mistake.

How to use an error summary

You must:

  • add "Error: " to the beginning of the <title> so screen readers read it out as soon as possible
  • show an error summary at the top of a page
  • move the keyboard focus to the error summary (nhsw-behaviours.js does this for you when the summary has data-module="nhsw-error-summary", which the macro adds)
  • include the heading "There is a problem"
  • link to each of the answers that have validation errors
  • show the same error messages next to the inputs with errors

Follow GOV.UK Design System guidance on writing good error messages.

Linking from the error summary to each answer

You must link the errors in the error summary to the answer they relate to.

For questions that require a user to answer using a single field, like a select, textarea or text input, link to the field.

When a user has to enter their answer into multiple fields, such as the day, month and year fields in the date input component, link to the 1st field that contains an error.

What is your date of birth?
For example, 15 3 1984

Error: The date of birth must include a year

If you do not know which field contains an error

If you do not know which field contains an error, link to the 1st field.

For questions that require a user to select 1 or more options from a list using radios or checkboxes, link to the 1st radio or checkbox.

How do you want to be contacted about this?
Select all options that are relevant to you

Error: Select how you want to be contacted

Where to put the error summary

Put the error summary at the top of the main container. If your page includes breadcrumbs or a back link, place it below these, but above the <h1>.

Your details

Error: Enter your full name

Accessibility

Do not clear form fields when showing validation errors. Keep the information the user has already entered so they can correct mistakes without having to re-enter data. This helps reduce efforts and supports WCAG 2.2 Success Criterion 3.3.7 Redundant Entry, level A.

Move keyboard focus to the error summary when a form contains errors. This makes sure that screen reader and keyboard users are immediately notified of errors and can understand what needs to be corrected. This supports WCAG 2.2 Success Criterion 3.3.1 Error Identification, level A.

Link error summary messages to the relevant form fields. Users should be able to select an error in the summary and be taken directly to the corresponding form field's id attribute to meet WCAG 2.2 Success Criterion 2.4.3 Focus Order, level A.

Source

Learn more about Error summaries in the GOV.UK Design System.

Back to top

Error summary variants

There are no variants available for this component.

Contact the DHCW Design System team if the existing component does not meet your requirements. Your feedback helps us understand gaps and prioritise future improvements.

If you adapt the component to meet a specific user need, share your findings with us to help build shared knowledge and support others using it.

Back to top

Examples

Welsh Immunisation System (WIS)

This example shows the "Add COVID-19 vaccine wastage details" screen within WIS. It uses an error summary component at the top of the main content area to immediately highlight where there has been an input error.

Error summary showing a single validation error linked to a date input field

Welsh Immunisation System (WIS)

This example shows the "Choose vaccine for delivery" screen within WIS. It uses an error summary component at the top of the page to highlight form validation errors clearly.

Error summary showing multiple validation errors with links to the fields that need attention

Back to top