Skip to content

Commit 3a75974

Browse files
ENGCOM-5643: #23705 : Css selector [role='button'] in related products javascript is not specific enough #23774
- Merge Pull Request #23774 from konarshankar07/magento2:23705_css_selector_issue - Merged commits: 1. 3bac25f
2 parents 0053757 + 3bac25f commit 3a75974

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ switch ($type = $block->getType()) {
170170
<?php if ($type == 'related' && $canItemsAddToCart) :?>
171171
<div class="block-actions">
172172
<?= $block->escapeHtml(__('Check items to add to the cart or')) ?>
173-
<button type="button" class="action select" role="button"><span><?= $block->escapeHtml(__('select all')) ?></span></button>
173+
<button type="button" class="action select" data-role="select-all"><span><?= $block->escapeHtml(__('select all')) ?></span></button>
174174
</div>
175175
<?php endif; ?>
176176
<div class="products wrapper grid products-grid products-<?= $block->escapeHtmlAttr($type) ?>">

app/code/Magento/Catalog/view/frontend/web/js/related-products.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define([
1717
relatedProductsField: '#related-products-field', // Hidden input field that stores related products.
1818
selectAllMessage: $.mage.__('select all'),
1919
unselectAllMessage: $.mage.__('unselect all'),
20-
selectAllLink: '[role="button"]',
20+
selectAllLink: '[data-role="select-all"]',
2121
elementsSelector: '.item.product'
2222
},
2323

0 commit comments

Comments
 (0)