Repository navigation
Description
What problem does this address?
Currently, @wordpress/admin-ui implements a Breadcrumb component that is tightly coupled to the @wordpress/route router. This limits its reusability (such as in projects that don't use @wordpress/route, or use-cases detached from routing) and makes the admin-ui package responsible for maintaining a lot of underlying UI implementation details.
What is your proposed solution?
@wordpress/ui should implement a Breadcrumb component that is agnostic to application concerns like routing.
It is common for component libraries / design systems to provide breadcrumbs behavior:
- https://chakra-ui.com/docs/components/breadcrumb
- https://mui.com/material-ui/react-breadcrumbs/
- https://coss.com/ui/docs/components/breadcrumb
- https://ui.shadcn.com/docs/components/radix/breadcrumb
Implementation details:
- It should be a pure UI primitive, using standard HTML elements or composing other low-level
@wordpress/uicomponents - Items are rendered as
<a href>by default, though render behavior can be controlled throughrenderprop (standard component behavior described in README.md) - This shouldn't just be a straight port of the existing implementation. Consider improvements to accessibility and semantics (e.g.
aria-current="page").- Also adapting to compound components as appropriate
- Does not render header elements (although, again, render element may be customized through
renderprop) - Should handle truncation (see discussion in Admin UI: Page header design spec #76709)
@wordpress/admin-ui's breadcrumb implementation should be refactored to use this component, though also keep in mind other related changes planned in Admin UI: Decouple Page component from@wordpress/route#77040
Full technical spec
Breadcrumb component v1 specification
Package: @wordpress/ui
Status: Draft for design and engineering review
Last updated: 17 July 2026
1. Summary
Breadcrumb is a routing-agnostic UI primitive that communicates the hierarchical path to the current page and provides navigation to its ancestors.
The component renders a labelled navigation landmark containing an ordered list. It automatically collapses ancestor links into an overflow menu when its full intrinsic content does not fit within the inline size allocated by its parent. Its responsive behavior is based entirely on measured available space; it has no viewport breakpoints, responsive settings, or fixed item limit.
The public API consists of three components:
Breadcrumb.RootBreadcrumb.LinkItemBreadcrumb.CurrentItem
The ordered list, list-item wrappers, separators, overflow trigger, menu, measurement tree, and tooltip behavior are owned by Breadcrumb.Root and are not independently exposed.
2. Normative language
The terms MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY describe normative requirements for the initial release.
3. Goals
The initial release MUST:
- Provide correct breadcrumb semantics using native HTML wherever possible.
- Remain independent of
@wordpress/routeand every other routing implementation. - Use complete
hrefvalues as its navigation boundary. - Allow a consumer to compose a router-aware link using the standard
renderAPI. - Automatically collapse ancestor links according to the component's measured inline size.
- Preserve access to every collapsed ancestor in an accessible overflow menu.
- Keep the current item visible at all times.
- Truncate only when collapse alone cannot resolve the available-space constraint.
- Reveal the full text of a visually truncated item in a tooltip.
- Preserve the complete item label for assistive technology.
- Work with mouse, keyboard, screen reader, zoom, RTL, forced-colors, and reduced viewport conditions.
- Avoid exposing configuration that is not required by an initial consumer.
4. Non-goals
The initial release MUST NOT attempt to:
- Coordinate the layout of an Admin UI page header.
- Move itself between header rows.
- Manage page headings, status badges, header actions, or title visibility.
- Interpret router parameters, route objects,
to,search,params, orhashprops. - Expose viewport or container breakpoints.
- Expose
maxItems,itemsBeforeCollapse,showRoot, or similar responsive settings. - Expose a public
List,Item,Separator,Ellipsis, or overflow-menu component. - Support arbitrary non-navigable ancestor items.
- Support a linked current item.
- Provide a configuration-array API in addition to the compound API.
- Impose a fixed maximum number of visible items.
5. Public API
5.1 Basic usage
import { Breadcrumb } from '@wordpress/ui';
<Breadcrumb.Root aria-label={ __( 'Breadcrumbs' ) }>
<Breadcrumb.LinkItem href="/">Dashboard</Breadcrumb.LinkItem>
<Breadcrumb.LinkItem href="/settings">Settings</Breadcrumb.LinkItem>
<Breadcrumb.CurrentItem>General</Breadcrumb.CurrentItem>
</Breadcrumb.Root>;5.2 Router composition
Breadcrumb.LinkItem MUST require a complete href. A router-aware component MAY be supplied through render.
<Breadcrumb.LinkItem
href="/settings/general?section=writing#defaults"
render={ ( props ) => <RouterLink { ...props } /> }
>
General
</Breadcrumb.LinkItem>The custom renderer MUST receive the complete link DOM props produced by the breadcrumb or overflow-menu context. These include the href, accessible name, ref, event handlers, and—when the item is collapsed—the menu-item role and keyboard interaction props.
Consumers SHOULD construct href values with browser-standard URL APIs when they need to add path, query, or fragment information.
5.3 Breadcrumb.Root
Breadcrumb.Root represents the complete breadcrumb trail.
It MUST:
- Render a
<nav>element by default. - Render the internal
<ol>. - Accept
Breadcrumb.LinkItemandBreadcrumb.CurrentItemas direct children. - Own collection registration, ordering, separators, overflow calculation, the overflow menu, and tooltip state.
- Forward its ref to the navigation landmark.
- Accept the standard
@wordpress/uirender,className,style, and compatible navigation-element props. - Have an accessible name through
aria-labeloraria-labelledby. - Provide a localized default accessible name of “Breadcrumbs” when neither naming prop is supplied.
If render replaces the native <nav>, the resulting element MUST retain navigation-landmark semantics and the accessible name. Component-provided semantics MUST not be removable through prop ordering.
5.4 Breadcrumb.LinkItem
Breadcrumb.LinkItem represents a navigable ancestor of the current page.
It MUST:
- Be a direct child of
Breadcrumb.Root. - Render one internal
<li>containing an<a>by default. - Require
href: string. - Require a text label for v1.
- Accept compatible anchor props.
- Accept the standard
renderAPI for composing a router link. - Forward its public ref to the rendered link, not the internal
<li>. - Use the same renderer and complete
hrefwhen it is represented byMenu.LinkItemin the overflow menu. - Preserve native anchor behaviors, including the browser link context menu and opening in a new tab where applicable.
It MUST NOT accept or infer aria-current="page" in v1.
5.5 Breadcrumb.CurrentItem
Breadcrumb.CurrentItem represents the current page.
It MUST:
- Be the final direct child of
Breadcrumb.Root. - Render one internal
<li>containing a<span>by default. - Require a text label for v1.
- Apply
aria-current="page". - Remain visible in every responsive state.
- Forward its public ref to the rendered current-item element, not the internal
<li>. - Accept the standard
renderAPI and compatible text-element props without acquiring link props. - Become keyboard-focusable only while its label is visually truncated, so that its tooltip can be revealed on focus.
It MUST NOT accept href or render as a navigation target in v1.
5.6 Child validation
In development builds, Breadcrumb.Root MUST report a concise error when:
- It contains a child other than
Breadcrumb.LinkItemorBreadcrumb.CurrentItem. - It contains no
Breadcrumb.LinkItem. - It contains no
Breadcrumb.CurrentItem. - It contains more than one
Breadcrumb.CurrentItem. Breadcrumb.CurrentItemis not the final item.- A
Breadcrumb.LinkItemdoes not have a usablehrefor text label. - Items produced from an array do not have stable React keys.
The expected minimum trail is one ancestor link followed by the current item.
5.7 Proposed TypeScript surface
The following illustrates the normative public surface. Exact imports and shared utility types may follow the package's local conventions.
import type { ReactNode } from 'react';
import type { ComponentProps } from '../utils/types';
export interface RootProps
extends Omit< ComponentProps< 'nav' >, 'children' > {
/**
* Breadcrumb.LinkItem elements followed by one Breadcrumb.CurrentItem.
*/
children: ReactNode;
}
export interface LinkItemProps
extends Omit<
ComponentProps< 'a' >,
'aria-current' | 'children' | 'href'
> {
/** Complete browser-compatible destination. */
href: string;
/** Plain-text breadcrumb label. */
children: string;
}
export interface CurrentItemProps
extends Omit<
ComponentProps< 'span' >,
'aria-current' | 'children' | 'tabIndex'
> {
/** Plain-text label for the current page. */
children: string;
}RootProps.children remains ReactNode because TypeScript cannot reliably enforce compound-child ordering. Development validation supplies the stricter runtime contract.
The Breadcrumb namespace MUST export only the three component values and their corresponding prop types for v1. Internal list, separator, overflow, collection, measurement, and tooltip types MUST remain private.
6. Semantic DOM contract
The default expanded structure MUST be equivalent to:
<nav aria-label="Breadcrumbs">
<ol>
<li>
<a href="/">Dashboard</a>
</li>
<li>
<span aria-hidden="true">/</span>
<a href="/settings">Settings</a>
</li>
<li>
<span aria-hidden="true">/</span>
<span aria-current="page">General</span>
</li>
</ol>
</nav>Requirements:
- The navigation landmark MUST be named.
- The hierarchy MUST use an ordered list.
- Each visible breadcrumb or overflow trigger MUST occupy one list item.
- Ancestors MUST use native anchors.
- The current item MUST be non-interactive and use
aria-current="page". - Separators MUST be excluded from the accessibility tree.
- Separators MUST NOT be interactive or separately focusable.
- The breadcrumb itself MUST NOT add custom keyboard handling to ordinary links.
7. Separators
The initial separator MUST be /.
Separators MUST:
- Be inserted automatically between visible list items.
- Be rendered in the DOM so that their intrinsic width participates in measurement.
- Be wrapped by an element with
aria-hidden="true". - Remain visible in forced-colors mode.
- Use design tokens for color and spacing.
- Use logical margin and padding properties.
Consumers MUST NOT manually interleave separators with breadcrumb items.
A future version MAY add renderSeparator to Breadcrumb.Root. If added, the breadcrumb MUST continue to own an outer presentation-only wrapper and MUST prevent the rendered separator from becoming focusable or exposed to assistive technology.
8. Responsive behavior
8.1 General rule
Responsive behavior MUST depend only on:
- The inline size allocated to
Breadcrumb.Root. - The intrinsic rendered widths of the complete item labels.
- The intrinsic widths of separators and the overflow trigger.
It MUST NOT depend on viewport width, media queries, container-query breakpoints, item-count thresholds, or public responsive settings.
8.2 Expanded state
When every item fits at its full intrinsic width, the component MUST:
- Render every item.
- Omit the overflow trigger and menu.
- Avoid truncating any label.
Unlike React Spectrum, the component MUST NOT collapse a trail merely because it contains more than a fixed number of items. If all items fit, all items remain visible.
8.3 Collapsed state
When the complete trail does not fit, the component MUST:
- Keep
Breadcrumb.CurrentItemvisible. - Introduce one overflow-menu trigger.
- Preserve the root
Breadcrumb.LinkItemwhen it fits alongside the overflow trigger and current item. - Preserve the ancestors nearest to the current item, working backward from the end, while their complete intrinsic labels fit.
- Collapse older middle ancestors first.
- Collapse the root into the same overflow menu when root, trigger, and current cannot fit together.
- Reconsider trailing ancestors after the root is collapsed, because removing the root may make room for a nearer ancestor.
- Put every non-visible
Breadcrumb.LinkItemin the overflow menu in original order. - Never create more than one overflow trigger.
- Never put
Breadcrumb.CurrentItemin the overflow menu.
The standard component SHOULD either display a Breadcrumb.LinkItem at its full intrinsic label width or collapse it. It SHOULD NOT shorten several visible ancestors merely to avoid collapsing them.
8.4 Last-resort truncation
If the overflow trigger and full current label still do not fit, the overflow trigger MUST retain its full target size and Breadcrumb.CurrentItem MAY shrink to the remaining inline space using end truncation.
The current item MUST NOT wrap by default.
The truncation mechanism MUST be generic enough to detect and support any Breadcrumb.LinkItem that becomes clipped because of consumer styling or a future internal maximum-width treatment, even though the standard collapse algorithm prefers collapsing link items over truncating them.
8.5 Expansion after resize
When more space becomes available, the component MUST automatically restore collapsed items in the inverse order:
- Remove truncation when the full current label fits.
- Restore the root when appropriate.
- Restore collapsed ancestors in hierarchy order.
- Remove the overflow trigger when all items fit.
No collapse or expansion animation is required for v1.
9. Overflow menu
9.1 Content
The overflow menu MUST contain only collapsed Breadcrumb.LinkItems.
It MUST NOT contain:
- Items still visible in the breadcrumb.
Breadcrumb.CurrentItem.- Breadcrumb separators.
- Non-interactive explanatory content.
This makes the visible and menu collections disjoint and ensures that every menu item is an actionable navigation link.
9.2 Trigger
The overflow trigger MUST:
- Be a native button.
- Occupy an internal breadcrumb
<li>. - Show a visual ellipsis whose glyph is hidden from assistive technology.
- Have
aria-haspopup="menu". - Reflect its state through
aria-expanded. - Control or label the menu using the relationships supplied by
Menu. - Have an accessible name that communicates the number of hidden items.
- Meet the project's 44 by 44 CSS-pixel target-size standard.
- Have a visible focus indicator in default and forced-colors modes.
Accessible names MUST use proper pluralization rather than string concatenation:
- “Show 1 hidden breadcrumb item”
- “Show 3 hidden breadcrumb items”
The same string SHOULD be used as the trigger's visual tooltip.
9.3 Popup semantics
The visible breadcrumb remains a normal nav > ol > li structure. Only the popup uses the Menu Button pattern.
The popup MUST use the eventual @wordpress/ui Menu component and be equivalent to:
<div role="menu" aria-labelledby="breadcrumb-overflow-trigger">
<a role="menuitem" href="/settings">Settings</a>
<a role="menuitem" href="/settings/advanced">Advanced</a>
</div>Each collapsed ancestor MUST use Menu.LinkItem so that it remains an HTML anchor while acquiring menu-item keyboard and focus behavior.
Because Base UI 1.6 defaults Menu.LinkItem to closeOnClick={ false }, the breadcrumb integration MUST explicitly close the menu when a link is activated.
9.4 Keyboard behavior
The menu MUST follow the WAI-ARIA Menu Button pattern:
EnterorSpaceon the trigger opens the menu and moves focus into it.- Arrow keys move among menu items.
HomeandEndmove to the first and last menu item where supported byMenu.- Printable-character navigation uses the complete item label.
EnterorSpaceactivates the focused link.Escapecloses the menu and returns focus to the overflow trigger.Tabcloses the menu and continues through the document according toMenubehavior.
9.5 Stability while open
The visible/collapsed item partition MUST be frozen while the overflow menu is open. Container resize or content changes MUST NOT remove, reorder, or replace the currently focused menu item.
When the menu closes, the component MUST perform a new measurement and apply the latest responsive state.
10. Truncated-label tooltips
10.1 General behavior
Every breadcrumb label that is actually visually truncated MUST expose its complete text in an @wordpress/ui Tooltip.
The tooltip MUST:
- Be enabled only when truncation is detected.
- Contain the complete, unmodified label.
- Open on mouse hover and keyboard focus.
- Close on
Escapeaccording to Tooltip behavior. - Remain a visual supplement rather than the source of the accessible text.
The component MUST detect actual clipping rather than infer it from label length. The baseline check is:
element.scrollWidth > element.clientWidthThe implementation MAY include a small pixel tolerance to avoid false positives caused by subpixel rounding.
10.2 Accessible text
The complete label MUST remain the item's DOM text even when CSS displays an ellipsis. text-overflow: ellipsis changes visual presentation, not the underlying string exposed to assistive technology.
Therefore:
- The implementation MUST NOT render a manually shortened string.
- It MUST NOT add a duplicate visually hidden copy of the same full label.
- It SHOULD NOT add a redundant
aria-labelwhen the full DOM text already provides the accessible text. - If a custom renderer replaces or alters the visible text, the resulting accessible name MUST still equal the complete supplied label.
The requirement is that the complete label is exposed to assistive technology; it does not require a literal aria-label attribute when native text content already achieves that result.
10.3 Link items
Breadcrumb.LinkItem is already keyboard-focusable. When truncated, its anchor MUST become the Tooltip trigger so that sighted mouse and keyboard users can inspect the full label.
10.4 Current item
Breadcrumb.CurrentItem is normally static text and MUST not be in the tab order when its full label is visible.
When and only when its label is actually truncated, the current-item element MUST receive tabIndex={ 0 } so that keyboard users can focus it and reveal the tooltip. Its complete DOM text and aria-current="page" remain intact.
When the item ceases to be truncated, the component MUST remove the internally added tabIndex.
If Breadcrumb.CurrentItem is focused when a resize makes the full label fit, the implementation SHOULD defer removing focusability until focus leaves, avoiding focus loss caused by a changing tab stop.
10.5 Touch limitation
The existing @wordpress/ui Tooltip is intentionally visual-only and disabled for touch input. The tooltip is therefore not a touch disclosure mechanism.
The current page's full title remains canonical page content outside this secondary-navigation component. Consumers MUST provide an appropriate page heading. If a future product requires sighted touch users to reveal the full current label from the breadcrumb itself, that requirement will need a touch-compatible Popover or another explicit disclosure and is outside v1.
Native title attributes MUST NOT be treated as the accessibility solution.
11. Measurement architecture
11.1 Intrinsic measurement tree
Breadcrumb.Root MUST maintain an invisible intrinsic rendering of the complete trail for measurement.
The measurement tree MUST:
- Represent every item at its full intrinsic width.
- Use the same typography, spacing, separator, and overflow-trigger metrics as the visible component.
- Remain mounted while the component is mounted.
- Be positioned outside normal layout.
- Use
visibility: hidden, notdisplay: none. - Be non-interactive.
- Be marked
inertandaria-hidden="true". - Never enter the tab order or accessibility tree.
- Avoid duplicate landmarks, accessible links, IDs, analytics, or router side effects.
Where possible, the measurement tree SHOULD render internal metric elements with the same classes rather than invoking consumer-provided link renderers a second time. A router renderer is expected to change navigation behavior, not the component-owned visual metrics.
11.2 Observed elements
The implementation MUST use ResizeObserver to observe:
- The content or border box used as the available inline-size container.
- The intrinsic measurement row.
- Individual intrinsic item elements when necessary to detect width redistribution that leaves the total row width unchanged.
Observing both available space and intrinsic content ensures recalculation for container resizing, zoom, theme changes, typography changes, and custom rendered content that changes geometry.
11.3 React-driven changes
The implementation MUST schedule a new measurement when the registered collection changes, including:
- Item insertion or removal.
- Item reordering.
- Label changes.
hrefor renderer changes that affect the item representation.- Direction changes.
The first client measurement SHOULD run in a layout effect so that the responsive state is applied before paint where practical.
11.4 Fonts
The implementation MUST recalculate after document.fonts.ready resolves because late-loading fonts can change intrinsic widths without changing React children.
11.5 No MutationObserver
The initial implementation MUST NOT use MutationObserver.
MutationObserver reports DOM changes rather than layout changes and would also observe responsive rerenders produced by the component itself. The combination of collection-driven effects, font readiness, and ResizeObserver on the container and measurement items provides the relevant geometry signals without mutation noise or additional feedback-loop risk.
Arbitrary imperative mutation inside a custom renderer is not a supported data-flow mechanism. If it changes geometry, the item-level ResizeObserver still supplies the necessary signal.
11.6 Measurement scheduling
The implementation SHOULD:
- Coalesce multiple observer notifications into one calculation per frame.
- Read all geometry before committing responsive state.
- Avoid synchronous read/write/read cycles.
- Compare the next responsive state with the current state before updating React state.
- Include approximately one CSS pixel of fit tolerance to avoid oscillation from rounded measurements.
- Keep each calculation O(n) in the number of breadcrumb items.
12. Focus management during resize
The component MUST NOT unmount a focused visible breadcrumb link solely because a resize changes the calculated visible set.
If a focused Breadcrumb.LinkItem would become collapsed while the overflow menu is closed, the component SHOULD temporarily pin that item until focus leaves, then recalculate.
If pinning cannot be maintained without making the component unusable, focus MAY be deliberately transferred to the overflow trigger, but focus MUST never fall back to the document body without an intentional transition.
The current item always remains visible. Its conditional tooltip focusability MUST follow the rules in section 10.4.
13. Server rendering and hydration
On the server, Breadcrumb.Root MUST render the complete semantic trail with no collapsed items.
On the client:
- The initial layout effect MUST measure and apply the appropriate responsive state.
- The pre-measurement full trail SHOULD be visually constrained so it cannot permanently force horizontal page scrolling.
- The measurement tree MUST not create hydration mismatches.
- The component MUST remain usable if
ResizeObserverordocument.fontsis temporarily unavailable; the fallback is the complete semantic trail with normal CSS overflow protection.
14. Internationalization and directionality
All component-owned user-facing strings MUST use WordPress internationalization utilities.
This includes:
- The default “Breadcrumbs” navigation label.
- Singular and plural overflow-trigger labels.
Strings MUST NOT be assembled by concatenation. Overflow counts MUST use the project's pluralization API.
The component MUST:
- Support labels of arbitrary translated length.
- Recalculate when translated labels change.
- Use logical CSS properties.
- Follow the surrounding writing direction.
- Preserve logical hierarchy order in RTL.
- Avoid directional icons for the default
/separator. If a future directional separator is supported, it must mirror in RTL.
15. Visual and interaction requirements
The component MUST:
- Use
@wordpress/uidesign tokens for typography, color, spacing, radii, and focus indicators. - Remain on a single line by default.
- Avoid relying on color alone for any state.
- Keep separators and focus indicators visible in forced-colors mode.
- Preserve at least WCAG AA contrast for text and separators.
- Give the overflow trigger a 44 by 44 CSS-pixel target.
- Avoid animation that would conflict with
prefers-reduced-motion. - Avoid horizontal document scrolling at a 320 CSS-pixel equivalent viewport.
16. Dependencies
16.1 Blocking
The @wordpress/ui Menu component described by Gutenberg issue #77348 is a blocking dependency. The breadcrumb MUST use the shared Menu implementation rather than creating private menu-button keyboard behavior.
16.2 Available
The following existing capabilities may be reused:
@wordpress/uiTooltip for visual truncated-label disclosure.@wordpress/uiLink styling and router-compatiblerenderconventions.@wordpress/composeor the package's preferred ResizeObserver utility.- Base UI's
useRenderand ref/prop merging conventions.
16.3 Non-blocking
The component MUST NOT wait for:
- Generic breakpoint or container-query tokens.
- A generic truncation component.
- Admin UI Page/header integration.
- A public separator customization API.
17. Testing requirements
17.1 API and validation tests
Tests MUST verify:
- The
Root,LinkItem, andCurrentItemAPI. - Required
hrefand text labels. - Custom link rendering receives the complete
hrefand merged DOM props. - Refs target the navigation element, rendered link, and rendered current element respectively.
- Invalid children and ordering produce development errors.
- There is exactly one final current item.
17.2 Semantic tests
Tests MUST verify:
- A named navigation landmark.
- An internal ordered list.
- One list item for each visible item and overflow trigger.
- Native ancestor links.
- Non-interactive current text with
aria-current="page". - Separators excluded from the accessibility tree.
- No duplicate accessible landmark or item from the measurement tree.
Semantic queries such as getByRole and getByLabelText MUST be preferred over test IDs.
17.3 Responsive algorithm tests
Deterministic geometry tests MUST cover:
- Every item fits.
- One middle ancestor collapses.
- Several middle ancestors collapse.
- Root remains visible while middle items collapse.
- Root collapses when it no longer fits.
- Removing root allows a nearer ancestor to remain visible.
- Only overflow trigger and current item remain.
- Current item truncates as the last resort.
- Growing the container restores items.
- Item insertion, removal, reordering, and relabelling trigger recalculation.
- Late font readiness triggers recalculation.
- The fit boundary does not oscillate because of subpixel rounding.
- No fixed item count causes otherwise-fitting items to collapse.
17.4 Overflow menu tests
Tests MUST verify:
- The trigger appears only when at least one link is collapsed.
- The trigger's accessible name uses the correct singular or plural form.
- The menu contains exactly the collapsed links.
- Visible links are not duplicated.
- The current item is not included.
- Menu links remain anchors with their complete
hrefvalues. - Activating a menu link closes the menu.
Enter,Space, arrow keys,Home,End, printable-character navigation,Escape, and focus return follow Menu behavior.- Resize does not alter menu contents while it is open.
17.5 Tooltip and truncation tests
Tests MUST verify:
- A tooltip is absent when the label fits.
- A tooltip is present when
scrollWidthexceedsclientWidth. - Tooltip content is the complete label.
- The complete label remains the DOM text.
- A truncated link reveals the tooltip on hover and focus.
- An untruncated current item is not in the tab order.
- A truncated current item receives
tabIndex={ 0 }and reveals the tooltip on focus. - Focus is preserved when truncation state changes.
- The tooltip popup does not create duplicate accessible text.
17.6 Measurement tests
Tests MUST verify:
- The intrinsic tree is mounted but inert and hidden from assistive technology.
- The available container and intrinsic content are observed.
- Item-level size changes can trigger recalculation.
- React collection changes trigger recalculation without
MutationObserver. - Observer callbacks are coalesced and do not create resize loops.
- Cleanup disconnects every observer.
17.7 Visual and manual tests
Visual regression coverage SHOULD include:
- Expanded, partially collapsed, root-collapsed, and current-truncated states.
- LTR and RTL.
- Default and forced-colors modes.
- 200% text zoom and 400% page zoom.
- A 320 CSS-pixel equivalent viewport.
- Long translated strings.
- Focus on every interactive element.
- Tooltip and overflow-menu positioning near viewport edges.
Manual accessibility verification MUST include at least:
- VoiceOver with Safari.
- NVDA with Firefox or Chrome.
- Keyboard-only operation.
- Pointer operation.
- A touch-device check documenting the tooltip limitation.
18. Acceptance criteria
The component is ready for initial release when all of the following are true:
- Its public API contains only
Root,LinkItem, andCurrentItem. - It renders a labelled
nav > ol > libreadcrumb trail. - It uses complete
hrefvalues and supports router composition throughrender. - It shows every item when the complete trail fits.
- It collapses only in response to measured intrinsic overflow.
- It exposes exactly the collapsed links in one accessible Menu popup.
- It never duplicates visible links in the menu.
- It always keeps the current item visible.
- It exposes the full text of every visually truncated label in a tooltip while retaining the full DOM text.
- It does not lose focus during responsive transitions.
- Its measurement tree is inert and excluded from the accessibility tree.
- It responds to container, content, item, and font metric changes without
MutationObserver. - Automated and manual accessibility tests pass.
- The Menu dependency is available in
@wordpress/ui.
19. Deferred extensions
The following are intentionally deferred until a concrete consumer requires them:
Breadcrumb.Listor lower-level structural composition.renderSeparator.- A linked-current variant.
- Arbitrary React-node labels plus a separate text value.
- Non-navigable ancestor categories.
- A configuration-array API.
- Consumer-controlled collapse thresholds or item limits.
- Touch-compatible full-label disclosure beyond the current page heading.
- Admin UI Page/header integration.
20. Research and source material
Gutenberg discussions
- #77039: UI — Add Breadcrumb component
- #76709: Admin UI Page/header specification
- #77040: Decouple Admin UI from
@wordpress/route - #77348: UI — Add Menu component
- #77391: Text truncation behavior
- #77694: Earlier Breadcrumb implementation attempt
- #80013: Breadcrumb URL/route API discussion
Accessibility standards
- WAI-ARIA APG: Breadcrumb Pattern
- WAI-ARIA APG: Navigation Menu Button Example
- WAI-ARIA APG: Menu and Menubar Pattern
- WAI-ARIA APG: Tooltip Pattern
- WAI-ARIA 1.2
- WCAG Failure F102: Content disappearing after reflow
Implementation references
Needs Design:
- While the design proposals in Admin UI: Page header design spec #76709 work well in larger viewports, it's not clear how best to handle longer breadcrumbs at smaller viewport sizes (e.g. collapsing or truncating items). There's some discussion in Admin UI: Page header design spec #76709, but the designs of the complete user flow (including expanding truncated content) are incomplete.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields💫 Done
Activity
abd-RAHEEM commentedon Apr 5, 2026
Hi @aduth !
I'd love to take this on. My plan is to first build the pure UI primitive in @wordpress/ui utilizing compound components and ensuring proper semantic HTML/a11y. Once the base component and truncation logic are solid, I'll tackle refactoring the @wordpress/admin-ui implementation to use it. Please let me know if there are any specific constraints or files I should look at first.
aduth commentedon Apr 6, 2026
Hey @abd-RAHEEM , glad you're interested in helping push this along!
Before jumping into implementation, I think it might be good to get some design alignment on some of the finer details of the component, especially the truncation behavior. A lot of the discussion in #76709 revolved around how the text should be truncated, but (a) I don't know that there was a firm decision there, and (b) we haven't really talked much about what should happen with the truncated content. For example, should we show the truncated items in a menu / popover after clicking the "..." ellipsis? There might be a dependency on related components like what's being added in #76438 . It's also not clear if that truncation happens automatically based on text overflow, or if we'll want to handle it with designated breakpoints (possible dependency on #73361).
I'm going to add a "Needs Design" label so that we can try to get some more clear design direction on some of these decisions.
In the meantime, I'd be interested to get your thoughts on this or other requirements we might need for the implementation, or an API design proposal for the component. Maybe we can learn something from how other component libraries implement these components.
ciampo commentedon Apr 8, 2026
For sure we'd need to comlpete two dependencies: correct text truncation and
Menucomponent.jasmussen commentedon Aug 31, 2026
@grbicsanja would you have capacity to take a look at this? I see a PR is in process, it would be nice to tie up loose ends.
Otherwise, let me know, I'll see if I can find some time.
ciampo commentedon Aug 31, 2026
PR adding the UI component: #80425
This component will be later integrated in admin ui (cc @simison )