Collection List Item
A collection list item is one entry in a collection-list, presenting a required heading plus optional thumbnail image, meta line (date, category), and short description.
Use it inside CollectionList to render homogeneous summary cards for articles, events, search results, or news entries.
Implementation Notes
- Renders a native
<li>element with classcollection-list-item headingprop is required — it is rendered as an<h3>heading inside the item- When
hrefis provided, the heading text is wrapped in an<a>element - Optional
imageUrl+imageAltrender a leading<img>thumbnail - Optional
metarenders a meta paragraph (e.g., date or category) - Optional
descriptionrenders a body paragraph - Optional
childrenrender after the description for custom extra content - Optional
labelsetsaria-labelto override the default accessible name
Composition
This component is part of the *List *ListItem composition pattern. It must be a child of CollectionList.
Props
heading: string (required) -- item heading textmeta: string (optional) -- meta line such as a date or categorydescription: string (optional) -- body description textimageUrl: string (optional) -- thumbnail image srcimageAlt: string (optional) -- thumbnail image alt texthref: string (optional) -- when provided, the heading is wrapped in an<a>label: string (optional) -- aria-label overridechildren: slot -- additional content rendered after the description...restProps: any additional HTML attributes
Usage
Article entry with link, meta, and description:
<CollectionListItem
heading="Plain language is for everyone"
href="/blog/plain-language"
meta="Published Jan 5, 2025"
description="A short overview of why plain language matters in public services."
/>
Event entry with thumbnail:
<CollectionListItem
heading="Annual conference"
imageUrl="/img/conf.jpg"
imageAlt="Speaker on stage"
meta="May 12, 2025"
/>
Keyboard Interactions
- Tab: moves focus to the heading link (when
hrefis provided) or to descendants - All key handling is delegated to the contained interactive elements
ARIA
- Implicit
listitemrole from<li>element aria-labelis rendered whenlabelis supplied- Image
altattribute provides the image's accessible text
When to Use
- Use as a child of
CollectionListto render an entry in a homogeneous list. - Use when each entry has a heading and optional supporting information.
- Use when the heading should optionally link to a detail page.
When Not to Use
- Do not use outside a
CollectionList. - Do not use for tabular data — use
DataTableRowinstead. - Do not use for navigation list items — use the appropriate
*ListItemfor the navigation.
Headless
Renders the structural skeleton — <li> with optional <img>, <h3>, <p class="...-meta">, <p class="...-description">, and slot. Visual spacing, image dimensions, and typography are entirely the consumer's responsibility.
Styles
Consumer CSS targets the collection-list-item class plus the inner collection-list-item-image, collection-list-item-heading, collection-list-item-meta, and collection-list-item-description classes for fine-grained control.
Testing
- Verify the component renders an
<li>element with classcollection-list-item - Verify the heading text appears inside an
<h3>element - Verify the heading is wrapped in an
<a>whenhrefis provided - Verify the heading is plain text when
hrefis omitted - Verify the image renders only when
imageUrlis provided - Verify the meta paragraph renders only when
metais provided - Verify the description paragraph renders only when
descriptionis provided - Verify children render after the description when supplied
- Verify additional HTML attributes pass through to the root
<li>
Advice
- Designers: Keep heading length predictable so the list reads as a tidy stack. Use thumbnails sparingly and at consistent dimensions.
- Developers: Always supply
imageAltwhenimageUrlis set. Usehrefto make the heading the link target so the entire heading text is announced as the link.
Related components
collection-list— a compact list of multiple related items such as articles or events
References
- US Web Design System Collection: https://designsystem.digital.gov/components/collection/
- HTML
<li>: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - WCAG 1.1.1 Non-text Content: https://www.w3.org/WAI/WCAG22/Understanding/non-text-content