Ask users for Equality information

Public sector organisations have a duty to consider the need to avoid discrimination and advance equality of opportunity as part of what they do. This is part of what’s called the public sector equality duty.

Public sector bodies often collect equality information about service users to help them meet this duty.

When to use this pattern

These patterns are based on the harmonised standards developed by the Government Statistical Service.

Collecting equality information in a consistent way across the public sector makes the data more useful. For example, an organisation can benchmark its own services against other public sector services or the population in general. And it can adjust its approach if it finds a particular group is under-represented.

Do not use this pattern to collect information for operational reasons - especially if you’re legally required to ask for the information in a particular way. For example, you’re asking about the user’s gender or sex to work out how much State Pension they’re entitled to.

How it works

When asking users for equality information, make it clear:

  • that the questions are different from other questions in the service
  • why you’re asking the questions, and what you’ll do with the information
  • that the questions are optional

Where to place equality questions

For a service that people are likely to use on a one-off basis:

  • place equality questions between the ‘check your answers’ page and the confirmation page
  • show the user a screen explaining why you’re asking the questions and what you’ll do with the information they provide, like the one below
  • on the ‘check your answers’ screen, group answers together under an ‘Optional equality questions’ heading
<h1 class="govuk-heading-l">We have received your application</h1>

<p class="govuk-body">Before you finish using the service, we’d like to ask some equality questions.</p>

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset" aria-describedby="equalities-info-hint">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
      Do you want to answer the equality questions?
    </legend>
    <div id="equalities-info-hint" class="govuk-hint">
      <p class="govuk-!-margin-top-0">These questions are optional. [Add a couple of sentences explaining why you’re asking the questions and what you’ll do with the information].</p>
      <p>Your answers won’t affect your application.</p>

    </div>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="equalities-info" name="equalities-info" type="radio" value="yes">
        <label class="govuk-label govuk-radios__label" for="equalities-info">
          Yes, answer the equality questions (takes 2 minutes)
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="equalities-info-2" name="equalities-info" type="radio" value="no">
        <label class="govuk-label govuk-radios__label" for="equalities-info-2">
          No, skip the equality questions
        </label>
      </div>
    </div>

  </fieldset>
</div>

<details class="govuk-details" data-module="govuk-details">
  <summary class="govuk-details__summary">
    <span class="govuk-details__summary-text">
      Why we ask equality questions
    </span>
  </summary>
  <div class="govuk-details__text">
    [Consider adding an optional longer explanation of what you’re asking the questions and what you’ll do with the information].
  </div>
</details>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/details/macro.njk" import govukDetails %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{% set hintHtml %}
  <p class="govuk-!-margin-top-0">These questions are optional. [Add a couple of sentences explaining why you’re asking the questions and what you’ll do with the information].</p>
  <p>Your answers won’t affect your application.</p>
{% endset -%}

<h1 class="govuk-heading-l">We have received your application</h1>

<p class="govuk-body">Before you finish using the service, we’d like to ask some equality questions.</p>

{{ govukRadios({
  idPrefix: "equalities-info",
  name: "equalities-info",
  fieldset: {
    legend: {
      text: "Do you want to answer the equality questions?",
      classes: "govuk-fieldset__legend--m"
    }
  },
  hint: {
    html: hintHtml
  },
  items: [
    {
      value: "yes",
      text: "Yes, answer the equality questions (takes 2 minutes)"
    },
    {
      value: "no",
      text: "No, skip the equality questions"
    }
  ]
}) }}

{{ govukDetails({
  summaryText: "Why we ask equality questions",
  text: "[Consider adding an optional longer explanation of what you’re asking the questions and what you’ll do with the information]."
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Longer term services

With a service that you expect users to return to multiple times, you’ll need to decide where to place the equality questions. For example, with an account-type service with tasks that need to be completed at different times, you might choose to make answering the equality questions an optional task.

You’ll also need to give users the option to update their equality information in case anything changes.

Get specialist privacy or data protection advice

Some or all of the equality information you collect is likely to be what’s called ‘special category personal data’, meaning it has special legal protections.

So before you start collecting equality information, it’s important to get advice and approval from your organisation’s privacy or data protection expert on how to collect and process the information.

You’ll also need to update the service’s privacy notice.

What information to collect

Public sector organisations will have someone who is responsible for making sure the organisation is meeting its obligations under the public sector equality duty. They can help you work out what equality information to collect.

This pattern covers:

  • age
  • disability
  • ethnic group
  • marital or partnership status
  • religion
  • sex and gender identity
  • sexual orientation

Collecting more detailed information

Start with the harmonised standards, keeping the categories of responses in the same order. Break them down into subcategories if necessary. For example if your service is aimed at a disabled people in particular, you may want to collect more detailed information about their disability. But make sure any categories you use map back to a ‘parent’ category in the harmonised standard.

Collecting other types of equality information

See the full list of Government Statistical Service harmonised standards if you want to collect other types of equality information. For example, about income or employment status.

Asking about date of birth (age)

Use this approach to ask for the user’s date of birth.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset" role="group" aria-describedby="date-of-birth-hint">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your date of birth?
      </h1>
    </legend>
    <div id="date-of-birth-hint" class="govuk-hint">
      For example, 31 3 1980. If you prefer not to say, continue without entering any information.
    </div>
    <div class="govuk-date-input" id="date-of-birth">
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-day">
            Day
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-2" id="date-of-birth-day" name="date-of-birth-day" type="text" autocomplete="bday-day" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-month">
            Month
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-2" id="date-of-birth-month" name="date-of-birth-month" type="text" autocomplete="bday-month" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-year">
            Year
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-4" id="date-of-birth-year" name="date-of-birth-year" type="text" autocomplete="bday-year" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/date-input/macro.njk" import govukDateInput %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukDateInput({
  id: "date-of-birth",
  namePrefix: "date-of-birth",
  fieldset: {
    legend: {
      text: "What is your date of birth?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  hint: {
    text: "For example, 31 3 1980. If you prefer not to say, continue without entering any information."
  },
  items: [
    {
      name: "day",
      classes: "govuk-input--width-2",
      autocomplete: "bday-day"
    },
    {
      name: "month",
      classes: "govuk-input--width-2",
      autocomplete: "bday-month"
    },
    {
      name: "year",
      classes: "govuk-input--width-4",
      autocomplete: "bday-year"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about disability

Use this approach to ask about disability.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Do you have any physical or mental health conditions or illness lasting or expected to last 12 months or more?
      </h1>
    </legend>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability" name="disability" type="radio" value="yes">
        <label class="govuk-label govuk-radios__label" for="disability">
          Yes
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability-2" name="disability" type="radio" value="no">
        <label class="govuk-label govuk-radios__label" for="disability-2">
          No
        </label>
      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability-4" name="disability" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="disability-4">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}

{{ govukRadios({
  idPrefix: "disability",
  name: "disability",
  fieldset: {
    legend: {
      text: "Do you have any physical or mental health conditions or illness lasting or expected to last 12 months or more?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "yes",
      text: "Yes"
    },
    {
      value: "no",
      text: "No"
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

If the user answers ‘yes’, ask about the impact of their condition or illness.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset" aria-describedby="disability-hint">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Do any of your conditions or illnesses reduce your ability to carry out day to day activities?
      </h1>
    </legend>
    <div id="disability-hint" class="govuk-hint">
      For example eating, washing, walking or going shopping.
    </div>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability" name="disability" type="radio" value="lot">
        <label class="govuk-label govuk-radios__label" for="disability">
          Yes, a lot
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability-2" name="disability" type="radio" value="little">
        <label class="govuk-label govuk-radios__label" for="disability-2">
          Yes, a little
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability-3" name="disability" type="radio" value="no">
        <label class="govuk-label govuk-radios__label" for="disability-3">
          Not at all
        </label>
      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="disability-5" name="disability" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="disability-5">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}

{{ govukRadios({
  idPrefix: "disability",
  name: "disability",
  fieldset: {
    legend: {
      text: "Do any of your conditions or illnesses reduce your ability to carry out day to day activities?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  hint: {
    text: "For example eating, washing, walking or going shopping."
  },
  items: [
    {
      value: "lot",
      text: "Yes, a lot"
    },
    {
      value: "little",
      text: "Yes, a little"
    },
    {
      value: "no",
      text: "Not at all"
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about ethnic group

The ethnic groups used here are for England. The Government Statistical Service harmonised standard for ethnicity uses different categories for Wales, Scotland and Northern Ireland. This is to reflect differences in local populations.

If your service covers more than one of England, Wales, Scotland or Northern Ireland, you should accommodate these differences in your design. For example, by changing the ethnic groups shown depending on where the user is based. Where this is not possible, use the English categories.

First ask about the user’s broad ethnic group.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your ethnic group?
      </h1>
    </legend>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity" name="ethnicity" type="radio" value="white">
        <label class="govuk-label govuk-radios__label" for="ethnicity">
          White
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-2" name="ethnicity" type="radio" value="multiple">
        <label class="govuk-label govuk-radios__label" for="ethnicity-2">
          Mixed or multiple ethnic groups
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-3" name="ethnicity" type="radio" value="asian">
        <label class="govuk-label govuk-radios__label" for="ethnicity-3">
          Asian or Asian British
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-4" name="ethnicity" type="radio" value="black">
        <label class="govuk-label govuk-radios__label" for="ethnicity-4">
          Black, African, Caribbean or Black British
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-5" name="ethnicity" type="radio" value="other">
        <label class="govuk-label govuk-radios__label" for="ethnicity-5">
          Other ethnic group
        </label>
      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-7" name="ethnicity" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-7">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}

{{ govukRadios({
  idPrefix: "ethnicity",
  name: "ethnicity",
  fieldset: {
    legend: {
      text: "What is your ethnic group?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "white",
      text: "White"
    },
    {
      value: "multiple",
      text: "Mixed or multiple ethnic groups"
    },
    {
      value: "asian",
      text: "Asian or Asian British"
    },
    {
      value: "black",
      text: "Black, African, Caribbean or Black British"
    },
    {
      value: "other",
      text: "Other ethnic group"
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Then ask for a more detailed category, depending on which broad ethnic group the user selects. Always give the user the option to enter their own description of their background.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your White background?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail" name="ethnicity-detail" type="radio" value="british">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail">
          English, Welsh, Scottish, Northern Irish or British
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-2" name="ethnicity-detail" type="radio" value="irish">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-2">
          Irish
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-3" name="ethnicity-detail" type="radio" value="gypsy-traveller">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-3">
          Gypsy or Irish Traveller
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-4" name="ethnicity-detail" type="radio" value="other" data-aria-controls="conditional-ethnicity-detail-4">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-4">
          Any other White background
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-ethnicity-detail-4">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your background? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-6" name="ethnicity-detail" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-6">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set ethnicityHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your background? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "ethnicity-detail",
  name: "ethnicity-detail",
  fieldset: {
    legend: {
      text: "Which of the following best describes your White background?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "british",
      text: "English, Welsh, Scottish, Northern Irish or British"
    },
    {
      value: "irish",
      text: "Irish"
    },
    {
      value: "gypsy-traveller",
      text: "Gypsy or Irish Traveller"
    },
    {
      value: "other",
      text: "Any other White background",
      conditional: {
        html: ethnicityHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your Mixed or Multiple ethnic groups background?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail" name="ethnicity-detail" type="radio" value="white-black-caribbean">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail">
          White and Black Caribbean
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-2" name="ethnicity-detail" type="radio" value="white-black-african">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-2">
          White and Black African
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-3" name="ethnicity-detail" type="radio" value="white-asian">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-3">
          White and Asian
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-4" name="ethnicity-detail" type="radio" value="other" data-aria-controls="conditional-ethnicity-detail-4">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-4">
          Any other Mixed or Multiple ethnic background
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-ethnicity-detail-4">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your background? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-6" name="ethnicity-detail" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-6">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set ethnicityHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your background? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "ethnicity-detail",
  name: "ethnicity-detail",
  fieldset: {
    legend: {
      text: "Which of the following best describes your Mixed or Multiple ethnic groups background?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "white-black-caribbean",
      text: "White and Black Caribbean"
    },
    {
      value: "white-black-african",
      text: "White and Black African"
    },
    {
      value: "white-asian",
      text: "White and Asian"
    },
    {
      value: "other",
      text: "Any other Mixed or Multiple ethnic background",
      conditional: {
        html: ethnicityHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your Asian or Asian British background?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail" name="ethnicity-detail" type="radio" value="indian">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail">
          Indian
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-2" name="ethnicity-detail" type="radio" value="pakistani">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-2">
          Pakistani
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-3" name="ethnicity-detail" type="radio" value="bangladeshi">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-3">
          Bangladeshi
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-4" name="ethnicity-detail" type="radio" value="chinese">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-4">
          Chinese
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-5" name="ethnicity-detail" type="radio" value="other" data-aria-controls="conditional-ethnicity-detail-5">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-5">
          Any other Asian background
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-ethnicity-detail-5">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your background? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-7" name="ethnicity-detail" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-7">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set ethnicityHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your background? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "ethnicity-detail",
  name: "ethnicity-detail",
  fieldset: {
    legend: {
      text: "Which of the following best describes your Asian or Asian British background?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "indian",
      text: "Indian"
    },
    {
      value: "pakistani",
      text: "Pakistani"
    },
    {
      value: "bangladeshi",
      text: "Bangladeshi"
    },
    {
      value: "chinese",
      text: "Chinese"
    },
    {
      value: "other",
      text: "Any other Asian background",
      conditional: {
        html: ethnicityHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your Black, African, Caribbean or Black British background?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail" name="ethnicity-detail" type="radio" value="african">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail">
          African
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-2" name="ethnicity-detail" type="radio" value="caribbean">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-2">
          Caribbean
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-3" name="ethnicity-detail" type="radio" value="other" data-aria-controls="conditional-ethnicity-detail-3">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-3">
          Any other Black, African or Caribbean background
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-ethnicity-detail-3">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your background? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-5" name="ethnicity-detail" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-5">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set ethnicityHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your background? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "ethnicity-detail",
  name: "ethnicity-detail",
  fieldset: {
    legend: {
      text: "Which of the following best describes your Black, African, Caribbean or Black British background?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "african",
      text: "African"
    },
    {
      value: "caribbean",
      text: "Caribbean"
    },
    {
      value: "other",
      text: "Any other Black, African or Caribbean background",
      conditional: {
        html: ethnicityHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your background?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail" name="ethnicity-detail" type="radio" value="arab">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail">
          Arab
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-2" name="ethnicity-detail" type="radio" value="other" data-aria-controls="conditional-ethnicity-detail-2">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-2">
          Any other ethnic group
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-ethnicity-detail-2">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your background? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-detail-4" name="ethnicity-detail" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-detail-4">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set ethnicityHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your background? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "ethnicity-detail",
  name: "ethnicity-detail",
  fieldset: {
    legend: {
      text: "Which of the following best describes your background?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "arab",
      text: "Arab"
    },
    {
      value: "other",
      text: "Any other ethnic group",
      conditional: {
        html: ethnicityHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about marriage or civil partnership status

Use this approach to ask about marriage or civil partnership status.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your legal marital or registered civil partnership status?
      </h1>
    </legend>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership" name="marriage-civil-partnership" type="radio" value="never">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership">
          Never married and never registered in a civil partnership
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-2" name="marriage-civil-partnership" type="radio" value="married">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-2">
          Married
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-3" name="marriage-civil-partnership" type="radio" value="civil-partnership">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-3">
          In a registered civil partnership
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-4" name="marriage-civil-partnership" type="radio" value="separated-married">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-4">
          Separated, but still legally married
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-5" name="marriage-civil-partnership" type="radio" value="separated-civil-partnership">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-5">
          Separated, but still legally in a civil partnership
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-6" name="marriage-civil-partnership" type="radio" value="divorced">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-6">
          Divorced
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-7" name="marriage-civil-partnership" type="radio" value="dissolved-civil-partnership">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-7">
          Formerly in a civil partnership which is now legally dissolved
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-8" name="marriage-civil-partnership" type="radio" value="widowed">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-8">
          Widowed
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-9" name="marriage-civil-partnership" type="radio" value="widowed-civil-partnership">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-9">
          Surviving partner from a registered civil partnership
        </label>
      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="marriage-civil-partnership-11" name="marriage-civil-partnership" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="marriage-civil-partnership-11">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}

{{ govukRadios({
  idPrefix: "marriage-civil-partnership",
  name: "marriage-civil-partnership",
  fieldset: {
    legend: {
      text: "What is your legal marital or registered civil partnership status?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "never",
      text: "Never married and never registered in a civil partnership"
    },
    {
      value: "married",
      text: "Married"
    },
    {
      value: "civil-partnership",
      text: "In a registered civil partnership"
    },
    {
      value: "separated-married",
      text: "Separated, but still legally married"
    },
    {
      value: "separated-civil-partnership",
      text: "Separated, but still legally in a civil partnership"
    },
    {
      value: "divorced",
      text: "Divorced"
    },
    {
      value: "dissolved-civil-partnership",
      text: "Formerly in a civil partnership which is now legally dissolved"
    },
    {
      value: "widowed",
      text: "Widowed"
    },
    {
      value: "widowed-civil-partnership",
      text: "Surviving partner from a registered civil partnership"
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about religion

The categories used here are for England. The Government Statistical Service harmonised standard for religion uses different categories for Wales, Scotland and Northern Ireland. This is to reflect differences in local populations.

If your service covers more than one of England, Wales, Scotland or Northern Ireland, you should accommodate these differences in your design. For example, by changing the categories shown depending on where the user is based. Where this is not possible, use the English categories.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your religion?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion" name="religion" type="radio" value="none">
        <label class="govuk-label govuk-radios__label" for="religion">
          No religion
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-2" name="religion" type="radio" value="christian" aria-describedby="religion-2-item-hint">
        <label class="govuk-label govuk-radios__label" for="religion-2">
          Christian
        </label>
        <div id="religion-2-item-hint" class="govuk-hint govuk-radios__hint">
          Including Church of England, Catholic, Protestant and all other Christian denominations.
        </div>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-3" name="religion" type="radio" value="buddhist">
        <label class="govuk-label govuk-radios__label" for="religion-3">
          Buddhist
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-4" name="religion" type="radio" value="hindu">
        <label class="govuk-label govuk-radios__label" for="religion-4">
          Hindu
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-5" name="religion" type="radio" value="jewish">
        <label class="govuk-label govuk-radios__label" for="religion-5">
          Jewish
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-6" name="religion" type="radio" value="muslim">
        <label class="govuk-label govuk-radios__label" for="religion-6">
          Muslim
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-7" name="religion" type="radio" value="sikh">
        <label class="govuk-label govuk-radios__label" for="religion-7">
          Sikh
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-8" name="religion" type="radio" value="other" data-aria-controls="conditional-religion-8">
        <label class="govuk-label govuk-radios__label" for="religion-8">
          Any other religion
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-religion-8">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            What is your religion? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="religion-10" name="religion" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="religion-10">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set religionHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "What is your religion? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "religion",
  name: "religion",
  fieldset: {
    legend: {
      text: "What is your religion?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "none",
      text: "No religion"
    },
    {
      value: "christian",
      text: "Christian",
      hint: {
        text: "Including Church of England, Catholic, Protestant and all other Christian denominations."
      }
    },
    {
      value: "buddhist",
      text: "Buddhist"
    },
    {
      value: "hindu",
      text: "Hindu"
    },
    {
      value: "jewish",
      text: "Jewish"
    },
    {
      value: "muslim",
      text: "Muslim"
    },
    {
      value: "sikh",
      text: "Sikh"
    },
    {
      value: "other",
      text: "Any other religion",
      conditional: {
        html: religionHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about sex and gender identity

Use this approach to ask about sex and gender identity.

<h1 class="govuk-heading-l">Sex and gender identity</h1>

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
      What is your sex?
    </legend>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sex" name="sex" type="radio" value="female">
        <label class="govuk-label govuk-radios__label" for="sex">
          Female
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sex-2" name="sex" type="radio" value="male">
        <label class="govuk-label govuk-radios__label" for="sex-2">
          Male
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sex-3" name="sex" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="sex-3">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
      Is the gender you identify with the same as your sex registered at birth?
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="gender-identity" name="gender-identity" type="radio" value="yes">
        <label class="govuk-label govuk-radios__label" for="gender-identity">
          Yes
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="gender-identity-2" name="gender-identity" type="radio" value="no" data-aria-controls="conditional-gender-identity-2">
        <label class="govuk-label govuk-radios__label" for="gender-identity-2">
          No
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-gender-identity-2">
        <div class="govuk-form-group">
          <label class="govuk-label" for="gender-description">
            What is your gender identity? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="gender-description" name="gender-description" type="text"></div>

      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="gender-identity-3" name="gender-identity" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="gender-identity-3">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

<h1 class="govuk-heading-l">Sex and gender identity</h1>

{% set genderHtml %}
  {{ govukInput({
    id: "gender-description",
    name: "gender-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "What is your gender identity? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "sex",
  name: "sex",
  fieldset: {
    legend: {
      text: "What is your sex?",
      classes: "govuk-fieldset__legend--m"
    }
  },
  items: [
    {
      value: "female",
      text: "Female"
    },
    {
      value: "male",
      text: "Male"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukRadios({
  idPrefix: "gender-identity",
  name: "gender-identity",
  fieldset: {
    legend: {
      text: "Is the gender you identify with the same as your sex registered at birth?",
      classes: "govuk-fieldset__legend--m"
    }
  },
  items: [
    {
      value: "yes",
      text: "Yes"
    },
    {
      value: "no",
      text: "No",
      conditional: {
        html: genderHtml
      }
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Asking about sexual orientation

Use this approach to ask about sexual orientation.

<div class="govuk-form-group">
  <fieldset class="govuk-fieldset">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Which of the following best describes your sexual orientation?
      </h1>
    </legend>
    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sexual-orientation" name="sexual-orientation" type="radio" value="heterosexual">
        <label class="govuk-label govuk-radios__label" for="sexual-orientation">
          Heterosexual or straight
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sexual-orientation-2" name="sexual-orientation" type="radio" value="gay-lesbian">
        <label class="govuk-label govuk-radios__label" for="sexual-orientation-2">
          Gay or lesbian
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sexual-orientation-3" name="sexual-orientation" type="radio" value="bisexual">
        <label class="govuk-label govuk-radios__label" for="sexual-orientation-3">
          Bisexual
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sexual-orientation-4" name="sexual-orientation" type="radio" value="other" data-aria-controls="conditional-sexual-orientation-4">
        <label class="govuk-label govuk-radios__label" for="sexual-orientation-4">
          Other
        </label>
      </div>
      <div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-sexual-orientation-4">
        <div class="govuk-form-group">
          <label class="govuk-label" for="other-description">
            How would you describe your sexual orientation? (optional)
          </label>
          <input class="govuk-input govuk-!-width-one-half" id="other-description" name="other-description" type="text"></div>

      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sexual-orientation-6" name="sexual-orientation" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="sexual-orientation-6">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/input/macro.njk" import govukInput %}

{% set sexualOrientationHtml %}
  {{ govukInput({
    id: "other-description",
    name: "other-description",
    type: "text",
    classes: "govuk-!-width-one-half",
    label: {
      text: "How would you describe your sexual orientation? (optional)"
    }
  }) }}
{% endset -%}

{{ govukRadios({
  idPrefix: "sexual-orientation",
  name: "sexual-orientation",
  fieldset: {
    legend: {
      text: "Which of the following best describes your sexual orientation?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "heterosexual",
      text: "Heterosexual or straight"
    },
    {
      value: "gay-lesbian",
      text: "Gay or lesbian"
    },
    {
      value: "bisexual",
      text: "Bisexual"
    },
    {
      value: "other",
      text: "Other",
      conditional: {
        html: sexualOrientationHtml
      }
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Validation and error messages

If a user enters information that’s valid but incomplete, accept it. For example, they might just enter their year of birth without the day or month.

Error messages should be styled like this -

<div class="govuk-form-group govuk-form-group--error">
  <fieldset class="govuk-fieldset" aria-describedby="ethnicity-error">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your ethnic group?
      </h1>
    </legend>
    <span id="ethnicity-error" class="govuk-error-message">
      <span class="govuk-visually-hidden">Error:</span> Select an ethnic group or ‘Prefer not to say’
    </span>
    <div class="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity" name="ethnicity" type="radio" value="white">
        <label class="govuk-label govuk-radios__label" for="ethnicity">
          White
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-2" name="ethnicity" type="radio" value="multiple">
        <label class="govuk-label govuk-radios__label" for="ethnicity-2">
          Mixed or multiple ethnic groups
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-3" name="ethnicity" type="radio" value="asian">
        <label class="govuk-label govuk-radios__label" for="ethnicity-3">
          Asian or Asian British
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-4" name="ethnicity" type="radio" value="black">
        <label class="govuk-label govuk-radios__label" for="ethnicity-4">
          Black, African, Caribbean or Black British
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-5" name="ethnicity" type="radio" value="other">
        <label class="govuk-label govuk-radios__label" for="ethnicity-5">
          Other ethnic group
        </label>
      </div>
      <div class="govuk-radios__divider">or</div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="ethnicity-7" name="ethnicity" type="radio" value="skip">
        <label class="govuk-label govuk-radios__label" for="ethnicity-7">
          Prefer not to say
        </label>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukRadios({
  idPrefix: "ethnicity",
  name: "ethnicity",
  fieldset: {
    legend: {
      text: "What is your ethnic group?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  errorMessage: {
    text: "Select an ethnic group or ‘Prefer not to say’"
  },
  items: [
    {
      value: "white",
      text: "White"
    },
    {
      value: "multiple",
      text: "Mixed or multiple ethnic groups"
    },
    {
      value: "asian",
      text: "Asian or Asian British"
    },
    {
      value: "black",
      text: "Black, African, Caribbean or Black British"
    },
    {
      value: "other",
      text: "Other ethnic group"
    },
    {
      divider: "or"
    },
    {
      value: "skip",
      text: "Prefer not to say"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
<div class="govuk-form-group govuk-form-group--error">
  <fieldset class="govuk-fieldset" role="group" aria-describedby="date-of-birth-hint date-of-birth-error">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        What is your date of birth?
      </h1>
    </legend>
    <div id="date-of-birth-hint" class="govuk-hint">
      For example, 31 3 1980. If you prefer not to say, continue without entering any information.
    </div>
    <span id="date-of-birth-error" class="govuk-error-message">
      <span class="govuk-visually-hidden">Error:</span> Enter a real date of birth, or leave it blank
    </span>
    <div class="govuk-date-input" id="date-of-birth">
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-day">
            Day
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-2" id="date-of-birth-day" name="date-of-birth-day" type="text" autocomplete="bday-day" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-month">
            Month
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-2" id="date-of-birth-month" name="date-of-birth-month" type="text" autocomplete="bday-month" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
      <div class="govuk-date-input__item">
        <div class="govuk-form-group">
          <label class="govuk-label govuk-date-input__label" for="date-of-birth-year">
            Year
          </label>
          <input class="govuk-input govuk-date-input__input govuk-input--width-4" id="date-of-birth-year" name="date-of-birth-year" type="text" autocomplete="bday-year" pattern="[0-9]*" inputmode="numeric"></div>
      </div>
    </div>

  </fieldset>
</div>

<button class="govuk-button" data-module="govuk-button">
  Continue
</button>
{% from "govuk/components/date-input/macro.njk" import govukDateInput %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukDateInput({
  id: "date-of-birth",
  namePrefix: "date-of-birth",
  fieldset: {
    legend: {
      text: "What is your date of birth?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  errorMessage: {
    text: "Enter a real date of birth, or leave it blank"
  },
  hint: {
    text: "For example, 31 3 1980. If you prefer not to say, continue without entering any information."
  },
  items: [
    {
      name: "day",
      classes: "govuk-input--width-2",
      autocomplete: "bday-day"
    },
    {
      name: "month",
      classes: "govuk-input--width-2",
      autocomplete: "bday-month"
    },
    {
      name: "year",
      classes: "govuk-input--width-4",
      autocomplete: "bday-year"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}

Research on this pattern

The two-step approach to asking for ethnicity information is based on:

Questions we’d like to answer through research

For one-off services, we’ve suggested placing the equality and diversity questions between the ‘check your answers’ and confirmation pages.

This is based on where the ‘Do you want to create an account?’ question is placed in the ‘Get support if you’re clinically extremely vulnerable to coronavirus’ service - but we’d like to confirm whether this placement works for the equality questions too.

We’d also appreciate any the following questions:

  • do users understand from the first ‘Equality questions’ screen that the questions they’re about to answer are different from other questions in the service?
  • do we need to explain why we’re asking each question individually, or is it enough to have an explanation at the start?
  • what’s the best way to ask for equality information in different types of service where you expect to have more than one contact with the user?
  • is including the ‘If you prefer not to say, continue without entering any information’ text the clearest way to get across that all the text inputs on that screen are optional?

Help improve this page

To help make sure that this page is useful, relevant and up to date, you can:

Need help?

If you’ve got a question about the GOV.UK Design System, contact the team.