Skip to content

Commit bc0687b

Browse files
committed
Localize aria label
1 parent 8b93728 commit bc0687b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

view/frontend/templates/product/breadcrumbs.phtml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ declare(strict_types=1);
77

88
use Magento\Catalog\Helper\Data as CatalogHelper;
99
use Magento\Catalog\ViewModel\Product\Breadcrumbs;
10+
use Magento\Framework\Escaper;
1011
use Magento\Framework\Json\Helper\Data;
1112
use Magento\Theme\Block\Html\Breadcrumbs as BreadcrumbsBlock;
1213
use Opengento\ProductBreadcrumbs\ViewModel\Product\Breadcrumbs as BreadcrumbsConfig;
1314

15+
/** @var Escaper $escaper */
1416
/** @var BreadcrumbsBlock $block */
15-
1617
/** @var Breadcrumbs $viewModel */
1718
$viewModel = $block->getData('viewModel');
1819
/** @var BreadcrumbsConfig $config */
@@ -38,7 +39,7 @@ $config = $block->getData('breadcrumbsConfig');
3839
?>
3940
<?= $breadcrumbs->toHtml() ?>
4041
<?php else: ?>
41-
<div class="breadcrumbs" aria-label="Breadcrumb" role="navigation"></div>
42+
<div class="breadcrumbs" aria-label="<?= $escaper->escapeHtmlAttr(__('Breadcrumb')) ?>" role="navigation"></div>
4243
<?php endif; ?>
4344
<?php if (!$config->isServerSideRendered() || $config->isClientSideOverrideAllowed()): ?>
4445
<?php $widget = $this->helper(Data::class)->jsonDecode($viewModel->getJsonConfigurationHtmlEscaped()); ?>

0 commit comments

Comments
 (0)