Source

Pen

Endike kote paj aktyèl la nan yon yerachi navigasyon ki otomatikman ajoute separatè atravè CSS.

Egzanp

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item active" aria-current="page">Home</li>
  </ol>
</nav>

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item active" aria-current="page">Library</li>
  </ol>
</nav>

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item"><a href="#">Library</a></li>
    <li class="breadcrumb-item active" aria-current="page">Data</li>
  </ol>
</nav>

Chanje separasyon an

Separatè yo otomatikman ajoute nan CSS atravè ::beforeak content. Yo ka chanje lè yo chanje $breadcrumb-divider. Fonksyon quote la nesesè pou jenere quotes alantou yon fisèl, kidonk si ou vle >kòm separe, ou ka itilize sa a:

$breadcrumb-divider: quote(">");

Li posib tou pou itilize yon icon SVG base64 entegre :

$breadcrumb-divider: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPjxwYXRoIGQ9Ik0yLjUgMEwxIDEuNSAzLjUgNCAxIDYuNSAyLjUgOGw0LTQtNC00eiIgZmlsbD0iY3VycmVudENvbG9yIi8+PC9zdmc+);

Separatè a ka retire lè w mete $breadcrumb-dividersou none:

$breadcrumb-divider: none;

Aksesiblite

Piske breadcrumbs bay yon navigasyon, li se yon bon lide pou ajoute yon etikèt ki gen sans tankou aria-label="breadcrumb"pou dekri kalite navigasyon yo bay nan <nav>eleman an, osi byen ke aplike yon aria-current="page"pou dènye atik nan ansanm pou endike ke li reprezante paj aktyèl la.

Pou plis enfòmasyon, gade WAI-ARIA Authoring Practices pou modèl breadcrumb la .