Skip to content

Commit

Permalink
[BUGFIX] Make screenreader current label translatable
Browse files Browse the repository at this point in the history
Resolves: #964
  • Loading branch information
benjaminkott committed Jun 22, 2023
1 parent 08cb370 commit e6f6971
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<source>To top</source>
</trans-unit>

<trans-unit id="navigation.link.screenreader.current">
<source>current</source>
</trans-unit>

<trans-unit id="breadcrumb">
<source>You are here:</source>
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<bk2k:icon icon="{item.icon}" width="{theme.navigation.icon.width}" height="{theme.navigation.icon.height}" />
</span>
</f:if>
<span class="nav-link-text">{item.title}<f:if condition="{item.current}"> <span class="visually-hidden">(current)</span></f:if></span>
<span class="nav-link-text">{item.title}<f:if condition="{item.current}"> <span class="visually-hidden">(({f:translate(key: 'navigation.link.screenreader.current', extensionName: 'bootstrap_package')}))</span></f:if></span>
</a>
<f:if condition="{item.children}">
<ul class="dropdown-menu" aria-labelledby="nav-item-{item.data.uid}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<bk2k:icon icon="{item.icon}" width="{theme.subnavigation.icon.width}" height="{theme.subnavigation.icon.height}" />
</span>
</f:if>
<span class="subnav-link-text">{item.title}<f:if condition="{item.current}"> <span class="visually-hidden">(current)</span></f:if></span>
<span class="subnav-link-text">{item.title}<f:if condition="{item.current}"> <span class="visually-hidden">({f:translate(key: 'navigation.link.screenreader.current', extensionName: 'bootstrap_package')})</span></f:if></span>
</a>
<f:if condition="{item.children}">
<f:render section="SubnavigationItem" arguments="{menu: item.children, theme: theme}" />
Expand Down

0 comments on commit e6f6971

Please sign in to comment.