The PR renders a page path as a row of links with / in between, or it maps location.pathname into spans and chevrons. The repo already has a Breadcrumb component with a nav landmark, separators, and aria-current="page" on the last item. Nearby settings and project pages use it. The homemade path has no landmark, the current page is just another link, and the separators are announced as text.
I've started treating a homemade slash path as an incomplete nav, not as a lighter breadcrumb. Printing the segments is the easy part. A landmark, a current page, and consistent separators are why the component is there.
Why the homemade path shows up
A tutorial "breadcrumb" example is an array of hrefs joined with a slash, or a chevron between Links. The model can write that without finding components/Breadcrumb. Your component may wrap a design-system Breadcrumb, or it may be named PageTrail or Crumbs, which is easy to miss if the prompt only says "show the path."
You also skip overflow on long titles, the difference between a visual separator and a list item, and the rule about not turning a breadcrumb into a primary navigation menu.
A simple Breadcrumb policy
- New page trails use the existing Breadcrumb component
- Do not build a slash-separated link row in a feature file
- Do not invent separators or current-page markup ad hoc
- A new size or collapse behavior is a component change, with a story
If the job is the primary app nav, that is the existing nav or sidebar, not a breadcrumb. If the path is a filesystem-style label and not navigation, do not fake a breadcrumb to style it.
What to put in the prompt
Use the existing Breadcrumb component for this page trail.
Do not build a slash-separated link row in this file.
Keep the nav landmark, separators, and current-page state on the component.
If this is primary app navigation, use the existing nav or sidebar instead.
Paste one existing Breadcrumb usage. In review, search the diff for a handmade / path, a chevron row that is not the component, and a current page that is still a link with no aria-current.
Reject / send back
Reject
- A feature-level path that reimplements the Breadcrumb component
- A slash or chevron row with no nav landmark
- A current page that stays an active link without
aria-current - A second breadcrumb library added for one title bar
Accept
- A trail that uses the existing Breadcrumb component
- A component PR that adds a documented collapse or size and a story
- Primary navigation that stays on the existing nav or sidebar
Top comments (0)