Skip to main content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Components

Additional info

Use: Deployed USWDS v3
Additional info makes content easier to scan as it hides information that may not be applicable to all users or situations. We use the Additional info component to situate plain language help at the point of the process where it is most relevant.

Examples

The v1 and v3 variations of this component are identical as this component does not exist in the USWDS. Teams should switch to the v3 variation in preparation for global color and typography changes that the v3 variation will accept.

Default

View va-additional-info v3 default in Storybook

No Border

  • Adding in the disable-border prop removes the left blue border from the expanded state of the component.

View va-additional-info v3 no border in Storybook

Usage

When to use Additional info

  • Revealing helpful background information: When you have additional information you want to convey about an application, process, or a step or question in a form that is not critical. This component should be used in instances where a more prominent Alert would not be appropriate.
  • Clarifying outcomes for an input: In cases where a person’s input can have large or complicated impact on outcomes we use contextual help in Additional info to locate expanded guidance next to the relevant interaction.
  • Information closely tied to an input. Use this component over an Accordion when the content is closely tied to a particular message or input on the screen. If the content is more tangentially related then use an Accordion.
  • Clarifying a form question: If a form question needs clarification, and that clarification is brief, use Additional info. The lighter design prevents breaking up the visual progression as the user navigates the form. These can also serve as alternative to where accordions feel too heavy. If a form is a conversation, Additional info would be considered an aside. (This case study on structuring complex health care questions for healthcare.gov goes into greater detail on how to structure your form as a conversation.)
  • Content that can be organized under the current heading. If you have additional content that provides context and makes sense under the same heading as the content nearby.
  • Information not applicable to all: Additional info can hide details that may not be applicable to all users.

When to consider something else

  • Accordions for a series: If you have a series of content in the body of a page and outside of a form or tool then an Accordion is preferred. For example, if you have a series of questions as part of an FAQ section or a set of options for payment that each have additional details.
  • Too much content: Only include critical information inside this component. This includes form fields that require a lot of explanation. Link to another page, consider an Accordion, or shorten the content. Collaborate with a member of CAIA to edit content and explore alternatives.
  • Required content: If the majority of people need the content to accomplish the main task then it should not be hidden from view.
  • Content organized under a new heading. If you have enough content that it makes sense to organize under a new heading that does not make sense under the same heading as the content nearby then use an Accordion.
  • Error messages or other immediate actions: Do not use this component for error messages or other critical or timely information.
  • Inside Alerts: Do not use this component inside an Alert. Try the Alert - Expandable component instead, especially when the Alert is within the page content and not at the top of the page.
  • Floating in space: Try to avoid using Additional info outside of the flow of the page, unattached to a section of content or another component. For example, there are instances of Additional info between a h1 and a Card. See placement for more.

Behavior

The help is triggered by clicking on a uniquely styled text link with a plain language hook. The helper text is revealed with a sliding drawer type animation (like the accordion) and is typically 1-3 short paragraphs. Shorter is better, and references to static content pages is encouraged when the situation is complicated.

Choosing between variations

Choose the No border variation when using Additional info inside of a bordered container as the border would be duplicative and unnecessary. Note however that the most common occurrence of this is using this component inside an Alert which is strongly discouraged. Consider instead linking to another page, especially if your content is long or complex, or reducing content.

Placement

The following are places where Additional info can be used:

  • After a header (h2, h3, h4) or paragraph to provide orthogonal details or provide an answer to a common question.
  • Within a Process list to shorten the length of content within a step.
  • Within a Form to provide additional help text.
  • Whenever there is a chance to enhance the understanding a user has about a particular choice.

Design principles

Code usage

Attributes and Properties

Property Attribute Type Default Description
disableAnalytics disable-analytics boolean false If `true`, doesn't fire the CustomEvent which can be used for analytics tracking.
disableBorder disable-border boolean false If `true`, left blue border and padding is removed.
trigger trigger string The text to trigger the expansion
uswds uswds boolean false Whether or not the component will use USWDS v3 styling.

Events

Name Description
component-library-analytics The event used to track usage of the component. This is emitted when an anchor link is clicked and disableAnalytics is not true.
resize

Content considerations

  • Use a statement (e.g. “Learn more about…”) rather than a question (e.g. “What is…?”) as a pattern for the title (trigger text) of the component. The question format has confused Veterans in testing when there is an input field related to that question somewhere else in the form.
  • When the component is expanded, the use of Headings (h4-h6), body text, links, ordered lists, and unordered lists are encouraged.

Accessibility considerations

  • The Additional Info component should be validated to meet the WCAG 2.2 AA accessibility guidelines.
  • The Additional Info component uses aria-controls and aria-expanded attributes to convey the expand and collapse functionality to assistive technologies.
  • Pressing the close button (a element with role of button) must close the Additional Info.
  • The link element that acts as the trigger for the drawer to open and close has a role of heading so it can be found in the page. Setting an aria-level is recommended.

Component checklist

Maturity

Guidance
Examples, usage, code usage, content considerations, and accessibility considerations are all complete.
Research
VFS team conducted research on this component which is linked from this page.
Stability
Component has been in production for more than 3 months with no significant issues found.
Adoption
Multiple teams have adopted this component.

Accessibility

Accessible use of color
Color is not used as the only visual means of conveying information (WCAG 2.2 1.4.1).
Accessible contrast
Text has a contrast ratio of at least 4.5:1 for small text and at least 3:1 for large text (WCAG 2.2 1.4.3). Visual information required to identify components and states (except inactive components) has a contrast ratio of at least 3:1 (WCAG 2.2 1.4.11).
Keyboard interactions
Follows WCAG 2.2 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions. All interactive elements can be selected and activated using the keyboard.
Content zoom tested
Component has been tested with the display set to 400% at 1280px viewport width to ensure that the component does not have overlapping text or elements and all interactive elements still operate.
Tested in screen readers
Tested with screen readers to ensure there are no issues with reading order, spelling, dynamic content, and interactive elements.

Code assets

Variations
Storybook includes all variations (style, size, orientation, optional iconography, selection, error state, etc.)
Responsive
Component depicted in all responsive breakpoints.
Interactive states
Includes all interactive states that are applicable (hover, active, focus, keyboard focus, disabled).
Tokens
All design attributes (color, typography, layout, etc.) are available as tokens.
Internationalization
Describes i18n attributes.

Visual assets

Variations
Sketch library includes all variations (style, size, orientation, optional iconography, selection, error state, etc.)
Responsive
Component designed to work in all responsive breakpoints.
Interactive states
Includes all interactive states that are applicable (hover, active, focus, keyboard focus, disabled).
Tokens
All design attributes (color, typography, layout, etc.) are available as tokens.
77% complete (14 of 18)

Legend:

  • Complete
  • Incomplete
  • Not applicable
Edit this page in GitHub (Permissions required)
Last updated: Mar 11, 2024