Docs

Main site

Installation Browser support Extend config MCP server
Validation Page speed testing Responsive design
Accordion Aspect Ratio Avatar Badge Banner Bento Grid Blockquote Breadcrumbs Button Callout Card Drawer Dropdown Link Modal Navbar Navblock Pagination Popover Progress Separator Tabs Timeline Toast Tooltip
Checkbox Datepicker File upload Form field Input Label OTP Radio Range Select Textarea Toggle
Header Footer
Accordion Auth Checkbox & Radio Content Drawers Features Modals Statistics & Metrics Teams Dropdowns
Address Contact number Currency symbol Date Emirates ID Name
Close
Home Documentation Components Breadcrumbs

Breadcrumbs

Breadcrumbs are a hierarchical navigation aid that shows the user's current location within a site and offers a quick way back to any ancestor page — especially useful in deep service journeys where the user needs to understand context without losing their place.

Navigation Interactive
Status
Active
Introduced
4.0.x
View source code

Anatomy

The aegov-breadcrumbs component composes a <nav> wrapper with one or more aegov-breadcrumbs-item children. The parent owns shared configuration — separator style, truncation length, and schema.org microdata — and propagates it to every item automatically.

Image showing anatomy of a breadcrumb trail

Item Name Description
1 Nav landmark The <nav aria-label="Breadcrumb"> wrapping the whole trail
2 Ancestor item A linked <a> pointing to a parent page
3 Separator A decorative, aria-hidden slash or chevron between items
4 Current item The last, unlinked item — marked aria-current="page"

Options

Breadcrumbs have options for different use cases. These are considered the basic properties applicable to a breadcrumb trail.

Slash (default)

Home Services Visa status

Chevron

Home Services Visa status

Separator style

The separator property controls the character drawn between items. slash (default) uses a typographic forward slash; chevron swaps it for a directional icon. Both separators mirror automatically in RTL. Both are aria-hidden="true" and never announced by screen readers.

Basic trail

A trail is built from a parent wrapping one or more items. Give every ancestor item an href; omit it on the last item so it renders as the current, unlinked page.

Home Services Identity Passport renewal
<aegov-breadcrumbs>
  <aegov-breadcrumbs-item href="/">Home</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services">Services</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services/identity">Identity</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>Passport renewal</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

Truncation

Long category names can push a trail onto a second line on narrow viewports. Set max-length on the parent to truncate every plain-text item to a fixed character count with an ellipsis. Items containing element children (icons, badges) are never truncated.

Home Government Services Directory Public Health Authority Vaccination Appointment Booking
<aegov-breadcrumbs max-length="14">
  <aegov-breadcrumbs-item href="/">Home</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services">Government Services Directory</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services/health">Public Health Authority</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>Vaccination Appointment Booking</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

Item with an icon

When an item contains element children (an inline SVG, a badge, a flag), the component skips text truncation entirely and renders the slot as-is. Useful for marking the home root with a small icon.

Home Identity Services Emirates ID renewal
<aegov-breadcrumbs separator="chevron">
  <aegov-breadcrumbs-item href="/">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="16" height="16" fill="currentColor"><rect width="256" height="256" fill="none"/><path d="M218.83,103.77l-80-75.48a12,12,0,0,0-17.66,0l-80,75.48A20,20,0,0,0,35,118.79V208a20,20,0,0,0,20,20H96a12,12,0,0,0,12-12V160h32v56a12,12,0,0,0,12,12h56a20,20,0,0,0,20-20V118.79A20,20,0,0,0,218.83,103.77Z"></path></svg>
    Home
  </aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services/identity">Identity Services</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>Emirates ID renewal</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

Schema.org microdata

Set is-microdata="true" to add BreadcrumbList / ListItem microdata to the underlying list container (<div role="list">) and each item host. Search engines use this to render breadcrumb-style result snippets. The visual output is unchanged — only the markup gains itemscope, itemtype, itemprop, and a <meta itemprop="position"> per item.

Home News 2026 National AI Strategy update
<aegov-breadcrumbs is-microdata="true">
  <aegov-breadcrumbs-item href="/">Home</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/news">News</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/news/2026">2026</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>National AI Strategy update</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

Link targets and pass-through attributes

Each linked item forwards aria-*, data-*, title, hreflang, rel, and referrerpolicy to the inner <a>. Set target="_blank" to open the destination in a new tab — when you do, also include rel="noopener" for security.

Home UAE federal portal Service catalogue
<aegov-breadcrumbs separator="chevron">
  <aegov-breadcrumbs-item href="/">Home</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item
    href="https://u.ae"
    target="_blank"
    rel="noopener"
    title="Open the UAE federal portal in a new tab"
  >
    UAE federal portal
  </aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>Service catalogue</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

RTL support

The breadcrumb trail is direction-agnostic. When the document or any ancestor has dir="rtl", the trail flows right-to-left, the separator (chevron or slash) mirrors automatically, and the aria-label on the <nav> switches to Arabic. No additional configuration is required.

الرئيسية الخدمات خدمات الهوية تجديد جواز السفر
<div dir="rtl">
  <aegov-breadcrumbs separator="chevron">
    <aegov-breadcrumbs-item href="/">الرئيسية</aegov-breadcrumbs-item>
    <aegov-breadcrumbs-item href="/services">الخدمات</aegov-breadcrumbs-item>
    <aegov-breadcrumbs-item href="/services/identity">خدمات الهوية</aegov-breadcrumbs-item>
    <aegov-breadcrumbs-item>تجديد جواز السفر</aegov-breadcrumbs-item>
  </aegov-breadcrumbs>
</div>

Usage

Here is the recommended usage of breadcrumbs on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.

Always omit href on the current page

The last item in the trail should render as plain text, not a link back to the page the user is already on. This is also what drives aria-current="page" for assistive technology.

Reflect the real hierarchy, not the click path

Breadcrumbs should always show a page's position in the site's structure — the same trail every time a user reaches that page — never the specific sequence of links they happened to click to get there.

Keep labels short and specific

Use the actual page or section title, not a generic label like "Page" or "Section 2". Use max-length only as a last resort for labels you cannot shorten at the source.

Do not use breadcrumbs as the only way to navigate

A breadcrumb trail supplements primary navigation (a header menu, a sidebar) — it should never be a page's sole means of moving between sections.

Do not include the current page as a link

Giving the last item an href still marks it aria-current="page", but it also renders a clickable link to the page the user is already on — confusing for both sighted and assistive-technology users.

Do not use breadcrumbs on a shallow site

A flat site with only one or two levels of depth (or a single-page marketing site) gains nothing from a breadcrumb trail and adds visual clutter instead.

Do not truncate so aggressively that labels become ambiguous

A max-length short enough to turn "Government Services Directory" and "Government Support Programme" into the same truncated string defeats the point of a breadcrumb — shorten the source label instead of clipping it that hard.

API reference

The following are the properties and references of a breadcrumbs trail

aegov-breadcrumbs default properties

AttributeDescriptionTypeDefault

field-id

DOM id for the inner <nav> element. Auto-generated if omitted.

string

auto-generated

separator

Visual separator drawn between items.

slash | chevron

slash

max-length

Maximum characters before an item's text is truncated with an ellipsis. Items containing element children (icons, badges) are never truncated — only plain text segments are.

number

undefined

is-microdata

Adds schema.org BreadcrumbList / ListItem microdata to the markup. Visual output is unchanged.

boolean

false

aegov-breadcrumbs-item default properties

AttributeDescriptionTypeDefault

href

URL the item links to. Omit to render the item as plain text instead of a link.

string

undefined

target

Where to open the linked document. Only applies when href is set.

_self | _blank | _parent | _top

_self

is-last, max-length, separator, is-microdata, position

Set automatically by the parent aegov-breadcrumbs. Setting these directly on an item is overwritten the next time the parent syncs.

various

various

Slots

ComponentSlotDescription

aegov-breadcrumbs

(default)

Place one or more aegov-breadcrumbs-item children here.

aegov-breadcrumbs-item

(default)

Item label. Accepts plain text or inline elements (icons, badges) — element children skip truncation entirely.

Events

EventDescriptionComponentDetail

aegovBreadcrumbItemClick

Fired when a linked item (one with href) is clicked. Default navigation still happens unless event.detail.event.preventDefault() is called on the underlying native MouseEvent — useful for SPA routers that need to intercept link clicks. The current, plain-text item (no href) has no click handler at all and never dispatches this event.

aegov-breadcrumbs-item

CustomEvent<{ href?: string; event: MouseEvent }>

<aegov-breadcrumbs id="trail">
  <aegov-breadcrumbs-item href="/">Home</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item href="/services">Services</aegov-breadcrumbs-item>
  <aegov-breadcrumbs-item>Driving licence</aegov-breadcrumbs-item>
</aegov-breadcrumbs>

<script>
  document.querySelector('#trail').addEventListener('aegovBreadcrumbItemClick', (e) => {
    console.log('Crumb clicked, href =', e.detail.href);
    // e.detail.event.preventDefault(); // intercept for SPA routing
  });
</script>

Pass-through attributes

AttributeNotesForwards to

aria-*

Set on <aegov-breadcrumbs> to reach the inner <nav> (e.g. to override the default aria-label); set on <aegov-breadcrumbs-item> to reach its <a> or <span>.

<nav> / <a> or <span>

data-*

Same forwarding rule as aria-* — useful for analytics hooks on individual items.

<nav> / <a> or <span>

title, hreflang, rel, referrerpolicy

Item-only, and only forwarded when the item has href set — a non-linked item renders a <span> and never receives these.

inner <a>

id

A plain id on the host is not read by the component. Use field-id on <aegov-breadcrumbs> — its value is what ends up on the inner <nav id>.

n/a

aria-current="page" is written whenever the parent marks an item is-last (i.e. whichever item is positioned last in the trail) — independently of whether that item also has href set. In every example on this page the last item omits href, so in practice "current page" and "no link" always coincide, but the two are driven by separate props in the source: give the last item an href and it still renders as a clickable <a>, just one also marked aria-current="page".

Notes

The following notes are applicable of this component.

Built-in accessibility

  • The wrapper renders as a <nav> landmark with aria-label="Breadcrumb" (English) or aria-label="مسار التنقل" (Arabic, auto-detected from the nearest ancestor's dir="rtl", falling back to <html dir>).
  • Items are exposed as a list — a <div role="list"> inside the <nav>, with each aegov-breadcrumbs-item host carrying role="listitem" — so screen readers announce the trail's length and each item's position. (A native <ol> is not used because it may not contain the custom-element hosts.)
  • Whichever item the parent marks as last is given aria-current="page", on the <a> if it has href, or the <span> if it doesn't.
  • Separators (both the slash and the chevron SVG) are aria-hidden="true" — screen readers skip them entirely.
  • Linked items render as native <a> elements with full keyboard, middle-click, and context-menu support.
  • aegov-breadcrumbs-item renders a visible inline error message (not a silent failure or a thrown exception) if used outside <aegov-breadcrumbs>.

Developer responsibility

  • Omit href on the last item so it renders as plain, non-interactive text rather than a link to the page the user is already on.
  • Keep labels concise — long category names can wrap onto a second line on narrow viewports. Use max-length if you cannot shorten the source text.
  • max-length truncates the text screen readers hear too. On a truncated linked item, provide the full label in title.
  • When using target="_blank", also set rel="noopener" for security, and provide a visible cue (an icon or parenthetical text) so users know the link opens a new tab before they activate it.
  • Do not nest other interactive elements inside an item besides the link itself.

Additional notes

  • max-length truncates with an ellipsis (…) at a fixed character count; it only clips items whose content is plain text. An item containing an icon or other element children is left untouched regardless of max-length.
  • Setting is-microdata="true" adds itemscope/itemtype/itemprop attributes and a <meta itemprop="position"> per item for schema.org/BreadcrumbList rich-result support — it changes no visible output.

Keyboard support

Key Action
Tab Move focus to the next breadcrumb link.
Shift + Tab Move focus to the previous breadcrumb link.
Enter Activate the focused link.