Patterns: Create a user profile

Gender identity and sex

Help a user select their gender identity and sex.

This pattern helps users to provide gender identity and sex information in an accurate and respectful manner. Gender identity and sex are often integral to an individual’s sense of self, and several federal agencies and working groups are striving to define a meaningful, inclusive way to collect gender identity and sex information when it is needed.

About these patterns

Background

Services collect gender identity information to let individuals tell us who they are: how they should be identified and how they wish to interact with the world. Gendered experiences are complex and vary widely. Gender is a social construct and gender identity can be an integral expression of a person’s sense of self.

Services collect sex information to match documents for identity proofing purposes, on certain statistical surveys, and to provide biological information in a clinical context. “Sex listed at birth” or “sex assigned at birth” is what it says on a person’s original birth certificate. “Legal sex” is what it says on any qualifying legal document. “Non-binary” is typically used when referring to gender identity, but many states now allow terms like non-binary, X, or unspecified on birth certificates.

While the sex listed on a person’s birth certificate or driver’s license is often used as part of validating their identity, gender identity is generally more important for ensuring respectful and inclusive policies, interactions, and communication.

Historically, the federal government has asked people to choose between male and female. Recently, agencies and programs have been moving toward providing more options, reflecting the fact that a person’s gender identity may not reflect the sex they were assigned at birth, and that sex is not always unambiguously male or female.

As one example, in April 2022, the U.S. Department of State updated Form DS-11 and began allowing people to self-attest and specify M (male), F (female), or X on their passports. The Department of State defines X as “Unspecified or another gender identity” on Form DS-11. The form collects this information as Gender but it is displayed on a passport as Sex. More recently, Executive Order 14075 Advancing Equality for Lesbian, Gay, Bisexual, Transgender, Queer, and Intersex Individuals makes specific calls for improved, responsible collection of sexual orientation and gender identity information.

The White House’s Office of Management and Budget, Federal Committee on Statistical Methodology interagency committee, and Centers for Disease Control and Prevention are just some of the federal agencies and programs working to define a meaningful, inclusive way to collect gender identity and sex information when it is needed. We were especially interested in the way CDC’s HIV Nexus Clinician Resources articulates the importance of asking two separate questions to ensure healthcare providers can provide patient-centered, high quality care: current gender identity, and sex listed at birth. A multi-question approach is also advocated for in Recommendations on the best practices for the collection of sexual orientation and gender identity data on federal statistical surveys released in January 2023.

This is an evolving space, and language recommendations are also evolving. In this pattern we’ve used the term gender identity to capture the way a person wishes to be represented, vs. gender as a construct. We’ve also used the term sex. For specific use cases, a more specific label may be correct, like Sex listed at birth or Legal sex. This language, in particular, should be evaluated for your specific program needs.

What problems do these patterns solve?

Gender and sex are often used synonymously. Many users struggle to provide gender identity information that best represents them. An overwhelming number of choices for gender identity can be as alienating as too limited a set of provided options.

Gender identity

When to use this pattern

Follow this pattern when you are collecting gender identity for your service or program. Only ask for gender identity if you need it. Sometimes it’s more prudent to skip collecting this information altogether.

What’s the solution?

Present the user with the tools to accurately depict their gender identity.

Guidance

What to do

  • Do collect gender identity data when you are collecting other general demographic information like race, ethnicity, or disability status.
  • Do support long text fields for gender identity. The language behind gender identity is constantly evolving.
  • Do include a "prefer not to answer" option.
  • Do consider safety implications of the information provided. Regional and state laws are highly variable and may not adequately protect individuals from disclosure.
  • Do provide helper text that explains why you are asking for this data and who it will be shared with.
  • Do be transparent about what you are asking for (for example, gender identity or sex).
  • Do use inclusive language. Consider using “they” or “you” instead of “he” or “she.”
  • Do use clear hint text to help users understand what type of information should be provided.
  • When collecting both gender identity and sex, gender identity should precede sex.
  • Use tested translations for labels and hint text when delivering multilingual surveys or forms.

What not to do

  • Do not assume gender identity based on sex.
  • Do not use other as a gender option. Instead use an open-ended text field.
  • Do not limit the user's choice of gender identity. Not everyone will fit into a specific classification determined by the form designer.
  • Do not combine gender identity and sex into a single question.

For example, man, woman, non-binary

<label class="usa-label" for="gender-identity">Gender identity</label>
<div class="usa-hint" id="gHint">For example, man, woman, non-binary</div>
<input class="usa-input" id="gender-identity" name="gender-identity" aria-describedby="gHint"/>
<div class="usa-checkbox">
  <input class="usa-checkbox__input" id="prefer-not-to-answer" type="checkbox"
    name="prefer-not-to-answer" value="prefer-not-to-answer" />
  <label class="usa-checkbox__label" for="prefer-not-to-answer">Prefer not to share my gender identity</label>
</div>
<label class="usa-label" for="gender-identity">Gender identity</label>
<div class="usa-hint" id="gHint">For example, man, woman, non-binary</div>
<input class="usa-input" id="gender-identity" name="gender-identity" aria-describedby="gHint"/>
<div class="usa-checkbox">
  <input class="usa-checkbox__input" id="prefer-not-to-answer" type="checkbox"
    name="prefer-not-to-answer" value="prefer-not-to-answer" />
  <label class="usa-checkbox__label" for="prefer-not-to-answer">Prefer not to share my gender identity</label>
</div>

Considerations

  • Confirm you need this information. As with all personal information, consider whether you need to collect it at all. Clearly explain the reason for asking for the information and what will be done to secure the user’s privacy and safety.
  • Avoid using a controlled vocabulary. If you don’t need to enforce a controlled vocabulary of gender identity options, strongly consider letting the user self-identify using a single text field.

Usability guidance

  • Provide clear hint text. Some users may be unfamiliar with this question and unsure how to answer. Provide clear hint text, such as, “For example, man, woman, non-binary.” Do allow users to opt out with a “Prefer not to answer” option.
  • This pattern uses checkboxes. See usability guidance for checkboxes.

Accessibility

  • Follow input guidance. These text fields should follow the accessibility guidelines for all text inputs.
  • These custom checkboxes are accessible. The custom checkbox component is accessible to screen readers because the default checkbox is moved off-screen with position: absolute; left: -999em.
  • Use a semantic tag. The checkbox should have a semantic tag for the id attribute, and its corresponding label should have the same value in its for attribute.
  • Customization. As you customize, make sure you follow accessibility guidelines for form templates and the accessibility guidelines for form controls.

Sex

When to use this pattern

Services collect sex information to match documents for identity proofing purposes, on certain statistical surveys, and to provide biological information in a clinical context. Only ask for this information if you need it. Even for identity proofing, sex data is not always needed. Asking for gender identity instead of sex is generally more important for ensuring respectful communication.

What’s the solution?

Know what information you need and ask for it with specificity. If you are collecting sex information to match documents for identity proofing, be clear about whether you need the sex marker listed on an original birth certificate (“Sex listed at birth”) or the sex marker listed on any qualifying legal document (“Legal sex”).

Guidance

What to do

  • Do determine if you need to collect sex data and only use if the information is essential to the user's experience. Services collect sex information to match documents for identity proofing purposes, on certain statistical surveys, or to provide biological information in a clinical context.
  • Do provide a controlled vocabulary when asking for sex listed at birth or legal sex (Male, Female, and X). Use helper text to explain that X should be used for any marker that is neither male nor female.
  • Do provide helper text that explains why you are asking for this data and who it will be shared with.
  • Do be transparent about what you are asking for. To some people gender and sex are synonymous, so use clear language.
  • Do use fieldset and legend to group related radio buttons together, and clear labels and attributes on these form elements.
  • When collecting both gender identity and sex, gender identity should precede sex.

What not to do

  • Do not assume gender identity based on the user's sex.
  • Do not include “prefer not to answer.” If you are considering adding this option, then consider whether the question is needed at all.
  • Do not combine gender identity and sex into a single question.

Matching an original birth certificate

Sex listed at birth Please enter the sex that appears on your original birth certificate. Use “X” for a sex listed on your birth certificate that is neither male nor female. Why do we ask for sex information?

Matching any qualifying legal document

Legal sex Please enter the sex that appears on your driver's license, state ID, passport, or passport card. Use “X” for a sex listed on your ID that is neither male nor female. Why do we ask for sex information?

Why do we ask for [type] information?

Include a description of why your service collects [type] information and how this data will be shared.

<h3 class="site-preview-heading">Matching an original birth certificate</h3>

<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Sex listed at birth</legend>
    <span class="usa-hint" id="slabHint">Please enter the sex that appears on your original birth certificate. Use “X” for a sex listed on your birth certificate that is neither male nor female. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-male" type="radio" name="sex-listed-at-birth" value="male" />
      <label class="usa-radio__label" for="slab-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-female" type="radio" name="sex-listed-at-birth" value="female" />
      <label class="usa-radio__label" for="slab-female">Female</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-x" type="radio" name="sex-listed-at-birth" value="x" />
      <label class="usa-radio__label" for="slab-x">X</label>
    </div>
  </fieldset>
</form>

<h3 class="site-preview-heading">Matching any qualifying legal document</h3>

<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Legal sex</legend>
    <span class="usa-hint" id="lsHint">Please enter the sex that appears on your driver's license, state ID, passport, or passport card. Use “X” for a sex listed on your ID that is neither male nor female. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-male" type="radio" name="legal-sex" value="male" />
      <label class="usa-radio__label" for="ls-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-female" type="radio" name="legal-sex" value="female" />
      <label class="usa-radio__label" for="ls-female">Female</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-x" type="radio" name="legal-sex" value="x" />
      <label class="usa-radio__label" for="ls-x">X</label>
    </div>
  </fieldset>
</form>

<div
class="usa-modal"
id="sex-data-transparency-statement"
aria-labelledby="sex-data-transparency-statement-heading"
aria-describedby="sex-data-transparency-statement-description"
>
  <div class="usa-modal__content">
    <div class="usa-modal__main">
      <h4 class="usa-modal__heading" id="sex-data-transparency-statement-heading">
        Why do we ask for [type] information?
      </h4>
      <div class="usa-prose">
        <p id="sex-data-transparency-statement-description">
          Include a description of why your service collects [type] information and how this data will be shared.
        </p>
      </div>
      <div class="usa-modal__footer">
        <button type="button" class="usa-button" data-close-modal>
          Return to the form
        </button>
      </div>
    </div>
    <button
      type="button"
      class="usa-button usa-modal__close"
      aria-label="Close this window"
      data-close-modal
    >
      <svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
        <use href="/assets/img/sprite.svg#close"></use>
      </svg>
    </button>
  </div>
</div>
<h3 class="site-preview-heading">Matching an original birth certificate</h3>

<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Sex listed at birth</legend>
    <span class="usa-hint" id="slabHint">Please enter the sex that appears on your original birth certificate. Use “X” for a sex listed on your birth certificate that is neither male nor female. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-male" type="radio" name="sex-listed-at-birth" value="male" />
      <label class="usa-radio__label" for="slab-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-female" type="radio" name="sex-listed-at-birth" value="female" />
      <label class="usa-radio__label" for="slab-female">Female</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="slab-x" type="radio" name="sex-listed-at-birth" value="x" />
      <label class="usa-radio__label" for="slab-x">X</label>
    </div>
  </fieldset>
</form>

<h3 class="site-preview-heading">Matching any qualifying legal document</h3>

<form class="usa-form usa-form--large">
  <fieldset class="usa-fieldset">
    <legend class="usa-legend">Legal sex</legend>
    <span class="usa-hint" id="lsHint">Please enter the sex that appears on your driver's license, state ID, passport, or passport card. Use “X” for a sex listed on your ID that is neither male nor female. <a href="#sex-data-transparency-statement" aria-controls="sex-data-transparency-statement" data-open-modal>Why do we ask for sex information?</a></span>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-male" type="radio" name="legal-sex" value="male" />
      <label class="usa-radio__label" for="ls-male">Male</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-female" type="radio" name="legal-sex" value="female" />
      <label class="usa-radio__label" for="ls-female">Female</label>
    </div>
    <div class="usa-radio">
      <input class="usa-radio__input" id="ls-x" type="radio" name="legal-sex" value="x" />
      <label class="usa-radio__label" for="ls-x">X</label>
    </div>
  </fieldset>
</form>

<div
class="usa-modal"
id="sex-data-transparency-statement"
aria-labelledby="sex-data-transparency-statement-heading"
aria-describedby="sex-data-transparency-statement-description"
>
  <div class="usa-modal__content">
    <div class="usa-modal__main">
      <h4 class="usa-modal__heading" id="sex-data-transparency-statement-heading">
        Why do we ask for [type] information?
      </h4>
      <div class="usa-prose">
        <p id="sex-data-transparency-statement-description">
          Include a description of why your service collects [type] information and how this data will be shared.
        </p>
      </div>
      <div class="usa-modal__footer">
        <button type="button" class="usa-button" data-close-modal>
          Return to the form
        </button>
      </div>
    </div>
    <button
      type="button"
      class="usa-button usa-modal__close"
      aria-label="Close this window"
      data-close-modal
    >
      <svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
        <use href="/assets/img/sprite.svg#close"></use>
      </svg>
    </button>
  </div>
</div>

Considerations

  • Confirm you need this information. As with all personal information, consider whether you need to collect it at all. Clearly explain the reason for asking for the information and what will be done to secure the user’s privacy and safety.
  • Be specific about the information you are requesting. Clearly state the context, such as, “Please enter the sex that appears on your driver’s license, state ID, passport, or passport card.” so that users can successfully provide the information required.

Accessibility

References

Disclaimer

Links to nongovernment sources are made for educational or source citation purposes only, and do not represent an endorsement of the organizations by the General Services Administration. The General Services Administration does not assume any responsibility for the content, operation, or policies of other entities’ websites.

Latest updates

Meaningful code and guidance updates are listed in the following table:

Date USWDS version Affects Breaking Description
2023-03-09 N/A
  • Guidance
No

Added new White House report. Added new White House report on collection of Sexual Orientation and Gender Identity (SOGI) information for statistical purposes. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added information on how some states collect sex data. Added information and a reference link for how some states collect sex data on birth certificates and other legal documents. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added more detail supporting specific use cases for collecting sex data. Added more detail about the most common use cases — matching an original birth certificate (“Sex listed at birth”) or matching current legal documents (“Legal sex”). More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Added Sex pattern safety and transparency guidance. Added additional guidance to promote using tested translations on multilingual forms, and providing helper text to explain data usage and sharing. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated usage of “gender identity” and “sex” to be more consistent throughout. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated usage for “sex listed at birth.” Updated our use of “sex listed at birth” to refer to original birth certificate information specifically. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated description of documented pattern use cases. Updated our background section to focus on documented use cases for collecting gender identity and sex data. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated information on Form DS-11. Added more detail about how the Department of State collects gender information on Form DS-11 and displays this information on passports. More information: uswds-site#1994

2023-03-09 N/A
  • Guidance
No

Updated Sex pattern preview. Show the most common use cases of matching documents — either an original birth certificate (“Sex listed at birth”) or current legal documents (“Legal sex”) — and include explanation of why and how the data is used in the hint text. More information: uswds-site#1994

2022-11-14 3.3.0
  • Guidance
No

Pattern published.