Native Web Components playground

Nova v3.37.0

Preview

Web Components

Advanced breadcrumbs

Accessible navigation trails, collapsed ancestors, and the current page.

← nv-breadcrumbs

Breadcrumbs show the path from a site's root to the current page. Keep labels short and use each ancestor's actual route in your application.

A navigation trail

Place breadcrumb items inside the breadcrumbs container, in root-to-page order. Each ancestor contains a link; the last item represents the current page. Wrap the trail in a navigation landmark with an accessible label when composing your page layout.

The landmark itself is ordinary HTML:

html<nav aria-label="Breadcrumb">
  <!-- Place your framework's breadcrumb composition here. -->
</nav>

The current page

Set current on the last breadcrumb. Nova hides this item visually and sets aria-current="location"; pair the trail with a visible page heading. Use a heading level that fits your page hierarchy (usually an h1 for the page title).

Collapsing long paths

For deep hierarchies, keep the root and nearest ancestor visible. Put the middle ancestors inside a breadcrumb with type="collapsed", each wrapped in a list item. Nova provides the expansion trigger and menu.

Keep the hidden ancestors in their original order. The collapsed item itself should not have a destination link: its job is to open the ancestor menu.

Icons and tooltips

Breadcrumb content can include a Nova icon alongside its link or text. Keep the text label accessible when using an icon for Home or another ancestor. An optional tooltip can clarify a shortened label or explain the collapsed trigger; it should supplement the link's accessible name.

Application routing and accessibility

  • Replace the example links with real destinations or your framework's router links.
  • Mark only the last breadcrumb as current, and keep a visible page heading.
  • Give each navigation landmark a distinct accessible label if a page has several.
  • Preserve keyboard navigation and visible focus when customizing link content.
  • Let Nova lay out separators and the collapsed menu; avoid inserting manual separators.

Troubleshooting

If the last breadcrumb seems missing, check whether it has current: hiding it visually is the intended behavior. If the collapsed menu is empty, check that its ancestors are nested inside list items and that only the container uses the collapsed type. Ensure Nova's styles and framework package are loaded using your playground's Getting Started guide before integrating the composition into an app.