Skip to content

Commit

Permalink
fix: (CXSPA-9012) fix breadcrumbs current page ariaLabel (#19862)
Browse files Browse the repository at this point in the history
  • Loading branch information
uroslates authored Jan 16, 2025
1 parent 30721de commit b15d924
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions projects/assets/src/translations/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"search": "Search",
"add": "Add",
"breadcrumbs": "breadcrumbs",
"breadcrumbsCurrentPage": "Current Page",
"selectFile": "Select file",
"clear": "Clear",
"loaded": "Loaded",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<nav [attr.aria-label]="'common.breadcrumbs' | cxTranslate" tabindex="-1">
<ol [attr.aria-label]="'common.breadcrumbs' | cxTranslate">
<li *ngFor="let crumb of crumbs$ | async">
<a [routerLink]="crumb.link" [innerHTML]="crumb.label"></a>
<li *ngFor="let crumb of crumbs$ | async; let last = last">
<a
[routerLink]="crumb.link"
[innerHTML]="crumb.label"
[attr.aria-label]="
last
? ('common.breadcrumbsCurrentPage' | cxTranslate) +
' ' +
crumb.label
: crumb.label
"
></a>
</li>
</ol>
</nav>
Expand Down

0 comments on commit b15d924

Please sign in to comment.