File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,8 @@ function the_bread( $ingredients = array() ) {
323323
324324 if ( ! empty ( $ crumbs ) ) {
325325
326+ echo '<nav aria-label="Breadcrumb"> ' ;
327+
326328 echo '<ol class="🍞 bread" itemscope itemtype="https://schema.org/BreadcrumbList"> ' ;
327329
328330 $ i = 0 ;
@@ -349,21 +351,31 @@ function the_bread( $ingredients = array() ) {
349351 };
350352
351353 echo '<li class="crumb" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
352- <a itemprop="item" href=" ' . $ crumb ['url ' ] . '">
354+ <a itemprop="item" href=" ' . $ crumb ['url ' ] . '" ' ;
355+
356+ if ( $ i === sizeof ( $ crumbs ) ) {
357+ echo ' aria-current="page" ' ;
358+ }
359+
360+ echo '>
353361 <span itemprop="name"> ' . $ title . '</span>
354362 </a>
355- <meta itemprop="position" content=" ' . $ i . '">
356- </li> ' ;
363+ <meta itemprop="position" content=" ' . $ i . '"> ' ;
357364
358365 if ( $ i !== sizeof ( $ crumbs ) && ! empty ( $ ingredients ['separator ' ] ) ) {
359366
360367 echo $ ingredients ['separator ' ];
361368
362369 };
363-
370+
371+ echo '</li> ' ;
372+
373+
364374 };
365-
375+
366376 echo '</ol> ' ;
377+
378+ echo '</nav> ' ;
367379
368380 };
369381
You can’t perform that action at this time.
0 commit comments