Skip to content

Commit

Permalink
Localize aria label
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Nov 7, 2024
1 parent 8b93728 commit bc0687b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions view/frontend/templates/product/breadcrumbs.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ declare(strict_types=1);

use Magento\Catalog\Helper\Data as CatalogHelper;
use Magento\Catalog\ViewModel\Product\Breadcrumbs;
use Magento\Framework\Escaper;
use Magento\Framework\Json\Helper\Data;
use Magento\Theme\Block\Html\Breadcrumbs as BreadcrumbsBlock;
use Opengento\ProductBreadcrumbs\ViewModel\Product\Breadcrumbs as BreadcrumbsConfig;

/** @var Escaper $escaper */
/** @var BreadcrumbsBlock $block */

/** @var Breadcrumbs $viewModel */
$viewModel = $block->getData('viewModel');
/** @var BreadcrumbsConfig $config */
Expand All @@ -38,7 +39,7 @@ $config = $block->getData('breadcrumbsConfig');
?>
<?= $breadcrumbs->toHtml() ?>
<?php else: ?>
<div class="breadcrumbs" aria-label="Breadcrumb" role="navigation"></div>
<div class="breadcrumbs" aria-label="<?= $escaper->escapeHtmlAttr(__('Breadcrumb')) ?>" role="navigation"></div>
<?php endif; ?>
<?php if (!$config->isServerSideRendered() || $config->isClientSideOverrideAllowed()): ?>
<?php $widget = $this->helper(Data::class)->jsonDecode($viewModel->getJsonConfigurationHtmlEscaped()); ?>
Expand Down

0 comments on commit bc0687b

Please sign in to comment.