Skip to content

Commit

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

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

<trans-unit id="main-navigation.label">
<source>Main navigation</source>
</trans-unit>
Expand Down
Expand Up @@ -30,7 +30,7 @@
</f:if>
<span class="nav-link-text">
{item.title}
<f:if condition="{item.current}"> <span class="visually-hidden">(current)</span></f:if>
<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}">
Expand Down
Expand Up @@ -19,7 +19,7 @@
</f:if>
<span class="nav-link-text">
{item.title}
<f:if condition="{item.current}"> <span class="visually-hidden">(current)</span></f:if>
<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:render section="dropdown" arguments="{data: data, items: item.children, theme: theme, level: level}" />
Expand Down
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 f9daa32

Please sign in to comment.