Skip to content

chore: Specs for Breadcrumb Trail#11566

Open
Artur- wants to merge 4 commits intomainfrom
breadcrumb-trail-spec
Open

chore: Specs for Breadcrumb Trail#11566
Artur- wants to merge 4 commits intomainfrom
breadcrumb-trail-spec

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented Apr 24, 2026

For #7960

@Artur- Artur- requested review from rolfsmeds and yuriy-fix April 24, 2026 15:02
@Artur- Artur- marked this pull request as ready for review April 27, 2026 10:28
Comment thread packages/breadcrumb-trail/spec/web-component-spec.md Outdated
| `overflow` | The listitem element containing the overflow button. |
| `overflow-button` | The button that reveals collapsed items. |

The `overlay` and `content` parts (the panel that appears when the overflow button is activated, and its inner wrapper) live on `<vaadin-breadcrumb-trail-overlay>` — see the element definition below. Themes target them as `vaadin-breadcrumb-trail-overlay::part(overlay)` and `vaadin-breadcrumb-trail-overlay::part(content)`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Themes target them as vaadin-breadcrumb-trail-overlay::part(overlay) and vaadin-breadcrumb-trail-overlay::part(content).

The overlay should use exportparts to export these parts, and themes should use vaadin-breadcrumb-trail::part(overlay). The -overlay element itself is considered an implementation detail.

Comment thread packages/breadcrumb-trail/spec/web-component-spec.md Outdated
Comment thread packages/breadcrumb-trail/spec/web-component-api.md Outdated
Copy link
Copy Markdown
Contributor

@rolfsmeds rolfsmeds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dropdown should probably support both arrow keys (since it looks like a menu) and tab-focusing between links (for a11y).

Comment thread packages/breadcrumb-trail/spec/web-component-spec.md Outdated
Comment thread packages/breadcrumb-trail/spec/web-component-spec.md Outdated
Artur- added 3 commits April 28, 2026 16:41
…eds)

Items 1–7 from the PR review:

1. Overlay light-DOM rendering via slot — the overlay configures
   _rendererRoot to a slotted light-DOM host (mirroring
   SelectOverlayMixin) so global page CSS can style the rendered
   hidden-item links. Replaces the earlier shadow-DOM
   [part="content"] write target.

2. Theme via host parts — exportparts on the overlay re-exposes
   the `overlay` and `content` parts on vaadin-breadcrumb-trail.
   Themes target vaadin-breadcrumb-trail::part(overlay), keeping
   the -overlay element as an internal implementation detail.

3. positionTarget origin — clarified that positionTarget comes
   from PositionMixin (packages/overlay), now listed in the
   element's mixin chain and the Reuse section.

4. Drop programmatic items — removed the items property, the
   BreadcrumbItemData type, the items-driven render pass, and
   Task 8 (programmatic items property). Added Discussion entries
   in web-component-spec.md and web-component-api.md explaining
   the removal. Tasks 9–19 renumbered to 8–18 with cross-
   references updated. Flow-side coverage table and KDD updated
   to reflect that the web component no longer has an items
   property to map.

5. role="list" on overlay content — the overlay's shadow
   <div part="content"> now carries role="list" so the slotted
   <vaadin-breadcrumb-item> elements form a valid ARIA list.

6. Distinct part names for link vs current — interactive items
   render <a part="link">; the current page renders
   <span part="current">. Themes can target the two cases with
   simple selectors instead of :not([path]).

7. Keyboard support in expanded overlay — Tab navigates linearly
   through the overlay's links (no focus trap), and Up/Down arrow
   keys provide menu-style navigation; Home/End jump to first/
   last; Escape closes and returns focus to the overflow button.
   requirements.md's req 7 amended to spell out the dual-keyboard
   contract; Task 13 (keyboard verification) extended to cover
   the new arrow-key handler in BreadcrumbTrailOverlayMixin.

The Discussion sections in web-component-spec.md and
web-component-api.md grew to document each substantive removal /
reshape per the spec-editing convention.
…ntent

vaadin-breadcrumb-trail::part(content) was ambiguous — "content"
reads as the visible trail of items, when in fact the overlay's
`content` part is the inner wrapper of the overflow popup.

The overlay's exportparts now renames it on export:
  exportparts="overlay, content: overlay-content"

So themes target vaadin-breadcrumb-trail::part(overlay-content)
for the overflow popup's inner wrapper, and the breadcrumb's own
trail wrapper part name (`list`) stays unambiguous.

Inside the overlay element the part is still called `content`,
matching every other Vaadin overlay — the rename is a host-side
disambiguation only.

Discussion entry added explaining the choice.
The non-link rendering ([part]) and the current-page state attribute
were both named "current", which conflated the rendering with one
specific reason for it. Items can also be rendered as plain text for
other reasons (e.g. an ancestor the user has no permission to navigate
to), and `[part="current"]` on a non-current item read wrong.

Renames:
- Inner element when `path` is unset: part="current" -> part="nolink"
- Part table entry, prose, internal-behavior bullet, Discussion entry
  in web-component-spec.md updated.
- Task 3 implementation/test text and Task 7 / Task 13 / Task 18
  references in web-component-tasks.md updated.

Unchanged:
- The `current` state attribute on the host (set by the parent on the
  last no-path item, drives aria-current="page") keeps its name.
- Themes that want the current-page case specifically can combine the
  two: vaadin-breadcrumb-item[current]::part(nolink).

Discussion entry rewritten to record why the previous "current" name
was too narrow and why "nolink" is preferred over alternatives like
"static" or "text".
@Artur- Artur- requested review from rolfsmeds and web-padawan April 28, 2026 13:42
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants