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

Add aria-label to page jump #33067

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions app/code/Magento/Theme/view/frontend/templates/html/pager.phtml
Expand Up @@ -7,7 +7,8 @@
/**
* Pager template
*
* @see \Magento\Theme\Block\Html\Pager
* @var \Magento\Theme\Block\Html\Pager $block
* @var \Magento\Framework\Escaper $escaper
*/
?>
<?php if ($block->getCollection()->getSize()): ?>
Expand Down Expand Up @@ -61,6 +62,10 @@
<li class="item">
<a class="page previous jump"
title=""
aria-label="<?= $escaper->escapeHtmlAttr(__(
'Skip to page %1',
$block->getPreviousJumpPage()
)) ?>"
href="<?= $block->escapeUrl($block->getPreviousJumpUrl()) ?>">
<span>...</span>
</a>
Expand All @@ -87,7 +92,13 @@

<?php if ($block->canShowNextJump()): ?>
<li class="item">
<a class="page next jump" title="" href="<?= $block->escapeUrl($block->getNextJumpUrl()) ?>">
<a class="page next jump"
title=""
aria-label="<?= $escaper->escapeHtmlAttr(__(
'Skip to page %1',
$block->getNextJumpPage()
)) ?>"
href="<?= $block->escapeUrl($block->getNextJumpUrl()) ?>">
<span>...</span>
</a>
</li>
Expand Down