Repository navigation
feat: add Breadcrumbs, Separator and Avatar - #101
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Breadcrumbs is a nav landmark named Breadcrumb in six languages, with an ordered list that keeps its role in writing, aria-current on the current page, aria-hidden separators in the items, and a span for a link without an address or with disabled. Separator is a role=separator line, vertical on request, or role=none when decorative. Avatar loads the image off the screen and renders the img once it is there, shows the fallback at once for a failure or a missing source, and holds it back for a delay while the image loads.
A failed image left a nameless avatar: the screen reader heard the letters of the initials. The fallback is a role=img named with the alt now, and hidden for an empty alt. The docs note that the image loads on mount, thus loading=lazy has no effect, and the breadcrumbs chevron turns for a right-to-left page.
Avatar: loading=lazy starts the load when the avatar comes into view; Avatar.Group is a named role=group with a max, and Avatar.Count says how many are past it, as +N on the screen and N more for the screen reader. Breadcrumbs: maxItems folds the middle of a long trail behind Breadcrumbs.Ellipsis, a button named Show N more pages; a press unfolds the trail and moves the focus to the first page that comes into view. Separator: with a value it is a window splitter, a tab stop with aria-valuenow that the arrow keys, Home, End, Enter and a pointer drag along the parent move, with the horizontal arrows flipped on a right-to-left page.
The prerender follows every link it finds. The demos linked to pages that do not exist, and the build of the docs failed with a 404 on /docs.
Agustin-Delgado
force-pushed
the
feat/breadcrumbs-separator-avatar
branch
from
September 20, 2026 14:47
e7c1e28 to
5d76f71
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three primitives that complete the catalog, each with the accessibility of a native element, and the patterns on top of them that a real page needs.
Breadcrumbs —
Root,List,Item,Link,Ellipsis,Separator.Rootis a<nav>landmark named "Breadcrumb" in the locale ofLocaleProvider(six languages), or with youraria-label.Listis an<ol>withrole="list"in writing: some browsers drop a list from the accessibility tree when itslist-styleisnone, which every trail sets.Linkis an<a>with anhref, and a<span>without one or withdisabled: not a link, and not a tab stop, with notabindexto manage.currentgivesaria-current="page".Separatorisaria-hidden, in the item after the link, thus the list holds pages only and the count a screen reader says is the count of pages. A slash without children.maxItemsfolds the middle of a long trail.Ellipsisis a button named "Show N more pages" that stands for the folded pages; a press unfolds the trail and moves the focus to the first page that comes into view, because the button is gone.bind:expandedreads and folds it back.Separator — one part.
role="separator",aria-orientation="vertical"only for a vertical line (a separator is horizontal unless it says otherwise), androle="none"withdecorativefor a line the content already makes.valueit is a window splitter: a tab stop witharia-valuenow,aria-valuemin,aria-valuemaxandaria-controls. The arrows of its axis move it bystep, orlargeStepwithShift;HomeandEndsend it to the ends;Enterfolds the pane tominand unfolds it to where it was; the pointer drags it along its parent, as a share of the parent's size. The horizontal arrows flip on a right-to-left page.data-dragginganddata-focus-visiblefor the styles.Avatar —
Root,Image,Fallback,Group,Count.Imageloads the image off the screen and renders the<img>once it is there: a broken image icon never shows. A cached image isloadedat once, with noloadingframe. A newsrcstarts a new load.loading="lazy"starts the load when the avatar comes into view.Fallbackshows at once for a failure or a missingsrc, and afterdelaymilliseconds while the image loads. It holds back on the server too. It takes the name of the image: arole="img"named with thealt, thus a failed image is not a nameless avatar and a screen reader does not hear the letters of the initials. An emptyalthides it.Roothasdata-statusandonStatusChangeforloading,loadedanderror.Groupis arole="group"named witharia-label, with amax: the avatars past it render nothing, thus they load no image.Countshows+N, and the screen reader hears "N more" in the locale.Docs pages for the three, with demos, and changesets.
Verification
Shift,Home,End,Enter, the range, the flip in RTL, a drag along the parent, and the disabled state; the tab order and the locale of the breadcrumbs, the span for a disabled link, the fold withmaxItems, the ellipsis and the focus after the press; the load, the failure, the missing source, the delay with fake timers, the change of source, the status callback, the name of the fallback, the lazy load on scroll, and the group with its count in two languages.role="list"and no markers,Tabskips the disabled link and lands on the current one with a ring, the fold shows "Home / … / Accessibility / Breadcrumbs" andEnteron the ellipsis unfolds it with the focus on "Docs"; the avatars show the image, the initials for a bad source and for no source, the group shows three of five with "+2" named "2 more"; the splitter follows a drag of a fifth of the row from 35 to 51,ArrowLeftandHomemove it from the keyboard with the ring on.