Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#6296 Article breadcrumbs use aria-current but do not point to the current page - OJS 3.4 #4133

Open
wants to merge 1 commit into
base: stable-3_4_0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions templates/frontend/components/breadcrumbs_article.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@
* @uses $currentTitleKey string Translation key for title of current page.
* @uses $issue Issue Issue this article was published in.
*}

<nav class="cmp_breadcrumbs" role="navigation" aria-label="{translate key="navigation.breadcrumbLabel"}">
{assign var=articlePath value=$publication->getData('urlPath')|default:$article->getId()}
<nav class="cmp_breadcrumbs" aria-label="{translate key="navigation.breadcrumbLabel"}">
<ol>
<li>
<a href="{url page="index" router=\PKP\core\PKPApplication::ROUTE_PAGE}">
{translate key="common.homepageNavigationLabel"}
</a>
<span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
<span class="separator" aria-hidden="true">{translate key="navigation.breadcrumbSeparator"}</span>
</li>
<li>
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="issue" op="archive"}">
{translate key="navigation.archives"}
</a>
<span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
<span class="separator" aria-hidden="true">{translate key="navigation.breadcrumbSeparator"}</span>
</li>
{if $issue}
<li>
<a href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
{$issue->getIssueIdentification()}
</a>
<span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
<span class="separator" aria-hidden="true">{translate key="navigation.breadcrumbSeparator"}</span>
</li>
{/if}
<li class="current" aria-current="page">
<span aria-current="page">
<li class="current">
<a href="{url page="article" op="view" path=$articlePath}" current="page">
{if $currentTitleKey}
{translate key=$currentTitleKey}
{else}
{$currentTitle|escape}
{$publication->getLocalizedTitle(null, 'html')|strip_unsafe_html}
{/if}
</span>
</a>
</li>
</ol>
</nav>
12 changes: 6 additions & 6 deletions templates/frontend/components/breadcrumbs_issue.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@
* @uses $currentTitleKey string Translation key for title of current page.
*}

<nav class="cmp_breadcrumbs" role="navigation" aria-label="{translate key="navigation.breadcrumbLabel"}">
<nav class="cmp_breadcrumbs" aria-label="{translate key="navigation.breadcrumbLabel"}">
<ol>
<li>
<a href="{url page="index" router=\PKP\core\PKPApplication::ROUTE_PAGE}">
{translate key="common.homepageNavigationLabel"}
</a>
<span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
<span class="separator" aria-hidden="true">{translate key="navigation.breadcrumbSeparator"}</span>
</li>
<li>
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="issue" op="archive"}">
{translate key="navigation.archives"}
</a>
<span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
<span class="separator" aria-hidden="true">{translate key="navigation.breadcrumbSeparator"}</span>
</li>
<li class="current" aria-current="page">
<span aria-current="page">
<li class="current">
<a href="{url op="view" path=$issue->getBestIssueId()}" aria-current="page">
{if $currentTitleKey}
{translate key=$currentTitleKey}
{else}
{$currentTitle|escape}
{/if}
</span>
</a>
</li>
</ol>
</nav>