Skip to content

Adds breadcrumb and fixes focus ring issues - #305

Merged
razorfever merged 4 commits into
mainfrom
development
Oct 5, 2026
Merged

razorfever merged 4 commits into
mainfrom
development

Conversation

@razorfever

Copy link
Copy Markdown
Contributor

This pull request introduces the c-breadcrumb and c-breadcrumb-item components for hierarchical site navigation, addresses keyboard focus ring visibility, and enhances documentation examples for date and time picker texts.

  • Adds Breadcrumb Component: Implements a new c-breadcrumb component and its c-breadcrumb-item children to display the current page's position in a site's hierarchy (ADR-0067).
    • Crumbs can be links or plain text for the current page.
    • Supports icons and provides accessible naming for icon-only crumbs.
    • Features dynamic folding of middle crumbs into a "…" disclosure panel when space is limited, with truncation for overly long labels.
    • The fold panel is keyboard navigable (Tab, arrow keys, Home/End, Escape) and integrates with single-page application routing.
    • Customizable texts are provided for the breadcrumb navigation and fold button.
  • Fixes Keyboard Focus Rings: Ensures that keyboard focus rings are consistently visible across various interactive elements.
    • Corrects an issue where outline-none prevented focus-visible rings from painting on c-time-picker's columns and buttons, c-date-picker's arrows and buttons, the close button of fullscreen panels, and c-link.
    • Introduces a linting rule to guard against future regressions where focus rings might not paint due to conflicting CSS outline properties.
  • Enhances Picker Texts Documentation: Expands the documentation examples for c-date-picker and c-time-picker to include comprehensive Finnish translations for all available text properties, improving internationalization guidance.

razorfever and others added 3 commits October 2, 2026 13:37
… examples

The examples set only the texts that existed when they were written, so
on the English docs page the rest fell back to English: the short month
names and Done in the date picker, Done, Now and the AM/PM texts in the
time picker, and the day names screen readers hear. Both now set every
text in Finnish, so they are complete translations to copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ings

`outline-none focus-visible:outline-2` computes a 2px ring of style
none in Tailwind v4: outline-none also sets --tw-outline-style, which
the width utility reads. The time picker's columns, end switch, Now and
Done, the date picker's arrows, view buttons, lists, Today and Done,
the fullscreen panels' close button and c-link matched :focus-visible
and drew nothing. Each now restates focus-visible:outline-solid, like
c-button. The selected end tab is filled with primary, so its ring is
on-primary inside the fill.

lint:focus fails on the pattern, and specs read the painted ring of
every stop reached from the keyboard. The two date picker baselines
taken after keyboard steps now show the ring; the time picker's
open-panel baseline was stale (the pills' squircle corners) and is
rewritten.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A page-level breadcrumb: c-breadcrumb holds c-breadcrumb-item crumbs,
each a link to a level of the hierarchy, the last always the current
page (plain text, aria-current="page"). Crumbs look like small text
buttons but render their own <a>; a single-page app routes by
intercepting a crumb's native click. An icon goes in a crumb's icon
slot, and an icon-only crumb is named by its host aria-label.

The row is always one line (ADR-0067). When its crumbs do not fit, the
middle ones fold behind a "…" button, the one nearest the first crumb
first; the first and current crumbs never fold, and past that their
labels truncate, current first, with the full label as a title. Folded
crumbs move into the fold panel through slot="folded", so the consumer's
own element, click listener included, is the panel row. Widths are
measured in the row and cached; the fold re-runs on resize, content
changes and font loads, in the list's own units under a CSS zoom.

The fold panel is a disclosure of links in the top layer with the menu
panel's look and a peek: Tab walks the folded crumbs, the arrow keys
move between them and wrap, Home/End reach the ends, and the arrows on
the fold button open it onto the first or last. Escape and a press
outside close it and return focus to the button. Focus is read in the
breadcrumb's own tree, so the panel stays open when an app renders the
breadcrumb in a shadow root. Chromium's renderer crashes when one frame
both empties an open popover and moves its anchor out of the row, so
the panel closes a frame before an unfold.

Chevrons and the fold button are mdi icons, and each label is nudged
so its capitals centre on them whatever font the page falls back to.
The glossary gains the breadcrumb terms; tree-select's in-panel one is
now the panel breadcrumb.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c-breadcrumb's `texts` takes an app default, so the generated
DEFAULTABLE_PROPS has its tag and the pinned allow-list spec failed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@razorfever
razorfever merged commit 28b58a5 into main Oct 5, 2026
3 checks passed
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.

2 participants