Skip to content

Commit 32ee51e

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/MAGETWO-32190' into UI
2 parents 20314b9 + b76b9b9 commit 32ee51e

File tree

13 files changed

+100
-46
lines changed

13 files changed

+100
-46
lines changed

app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
</block>
8383
</referenceContainer>
8484
<referenceBlock name="page.main.title">
85+
<arguments>
86+
<argument name="id" xsi:type="string">page-title-heading</argument>
87+
<argument name="add_base_attribute_aria" xsi:type="string">page-title-heading toolbar-amount</argument>
88+
</arguments>
8589
<block class="Magento\Catalog\Block\Category\Rss\Link" name="rss.link" template="Magento_Catalog::category/rss.phtml"/>
8690
</referenceBlock>
8791
</body>

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

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ $imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\I
5252
<?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
5353
<?php foreach ($_productCollection as $_product): ?>
5454
<?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
55-
<div class="product-item-info">
55+
<div class="product-item-info" data-container="product-grid">
5656
<?php // Product Image ?>
57-
<a href="<?php echo $_product->getProductUrl() ?>" class="product photo product-item-photo">
57+
<a href="<?php echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
5858
<?php echo $imageBlock->init($_product, $image)->toHtml() ?>
5959
</a>
6060
<div class="product details product-item-details">
61-
<?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?>
61+
<?php
62+
$_productNameStripped = $block->stripTags($_product->getName(), null, true);
63+
?>
6264
<strong class="product name product-item-name">
63-
<a class="product-item-link" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>">
65+
<a class="product-item-link"
66+
href="<?php echo $_product->getProductUrl() ?>">
6467
<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
6568
</a>
6669
</strong>
@@ -75,7 +78,9 @@ $imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\I
7578
<form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
7679
<input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
7780
<input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
78-
<button type="submit" title="<?php echo __('Add to Cart') ?>" class="action tocart primary">
81+
<button type="submit"
82+
title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
83+
class="action tocart primary">
7984
<span><?php echo __('Add to Cart') ?></span>
8085
</button>
8186
</form>
@@ -89,17 +94,25 @@ $imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\I
8994
</div>
9095
<div data-role="add-to-links" class="actions-secondary"<?php echo strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>>
9196
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
92-
<a href="#" title="<?php echo __('Add to Wishlist') ?>"
97+
<a href="#"
98+
class="action towishlist"
99+
title="<?php echo $block->escapeHtml(__('Add to Wishlist')); ?>"
100+
aria-label="<?php echo $block->escapeHtml(__('Add to Wishlist')); ?>"
93101
data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
94-
class="action towishlist" data-action="add-to-wishlist">
102+
data-action="add-to-wishlist"
103+
role="button">
95104
<span><?php echo __('Add to Wishlist') ?></span>
96105
</a>
97106
<?php endif; ?>
98107
<?php
99108
$compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
100109
?>
101-
<a href="#" class="action tocompare" title="<?php echo __('Add to Compare') ?>"
102-
data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'>
110+
<a href="#"
111+
class="action tocompare"
112+
title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
113+
aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
114+
data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
115+
role="button">
103116
<span><?php echo __('Add to Compare') ?></span>
104117
</a>
105118
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
use Magento\Catalog\Model\Product\ProductList\Toolbar;
1717
?>
18-
<p class="toolbar-amount">
18+
<p class="toolbar-amount" id="toolbar-amount">
1919
<?php if ($block->getLastPageNum() > 1): ?>
2020
<?php echo __('Items %1-%2 of %3',
2121
'<span class="toolbar-number">' . $block->getFirstNum() . '</span>',

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use Magento\Catalog\Model\Product\ProductList\Toolbar;
1919
<div class="modes">
2020
<?php $_modes = $block->getModes(); ?>
2121
<?php if ($_modes && count($_modes) > 1): ?>
22-
<strong class="modes-label"><?php echo __('View as') ?></strong>
22+
<strong class="modes-label" id="modes-label"><?php echo __('View as') ?></strong>
2323
<?php foreach ($block->getModes() as $_code => $_label): ?>
2424
<?php if ($block->isModeActive($_code)): ?>
2525
<strong title="<?php echo $_label ?>"
@@ -32,7 +32,9 @@ use Magento\Catalog\Model\Product\ProductList\Toolbar;
3232
title="<?php echo $_label ?>"
3333
href="#"
3434
data-role="mode-switcher"
35-
data-value="<?php echo strtolower($_code); ?>">
35+
data-value="<?php echo strtolower($_code); ?>"
36+
id="mode-<?php echo strtolower($_code); ?>"
37+
aria-labelledby="modes-label mode-<?php echo strtolower($_code); ?>">
3638
<span><?php echo $_label ?></span>
3739
</a>
3840
<?php endif; ?>

app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if ($product->isSaleable()) {
4646
}
4747
?>
4848
<?php if ($product->getMsrp()): ?>
49-
<span class="old-price"><?php echo $msrpPrice ?></span>
49+
<span class="old-price msrp-price-wrapper"><?php echo $msrpPrice ?></span>
5050
<?php endif; ?>
5151

5252
<?php if ($priceType->isShowPriceOnGesture()): ?>

app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
$target_id = $block->getTargetId();
1010
?>
11-
<a id="<?php echo $target_id?>" name="<?php echo $target_id?>" tabindex="0"></a>
11+
<a id="<?php echo $target_id?>" name="<?php echo $target_id?>" tabindex="-1"></a>

app/code/Magento/Theme/view/frontend/templates/html/title.phtml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,19 @@
1212
$cssClass = $block->getCssClass() ? ' ' . $block->getCssClass() : '';
1313
$title = '';
1414
if (trim($block->getPageTitle())) {
15-
$title = '<span class="base" data-ui-id="page-title" ' . $block->getAddBaseAttribute() . '>' . $block->escapeHtml($block->getPageTitle()) . '</span>';
15+
$title = '<span class="base" data-ui-id="page-title" ' . $block->getAddBaseAttribute() . '>'
16+
. $block->escapeHtml($block->getPageTitle()) . '</span>';
1617
}
1718
?>
1819
<?php if ($title): ?>
1920
<div class="page-title<?php echo $cssClass; ?>">
20-
<h1 class="title"><?php echo $title ?></h1>
21+
<h1 class="title"
22+
<?php if ($block->getId()): ?> id="<?php echo $block->getId();?>" <?php endif; ?>
23+
<?php if ($block->getAddBaseAttributeAria()): ?>
24+
aria-labelledby="<?php echo $block->getAddBaseAttributeAria(); ?>"
25+
<?php endif; ?>>
26+
<?php echo $title ?>
27+
</h1>
2128
<?php echo $block->getChildHtml(); ?>
2229
</div>
2330
<?php endif; ?>

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
.old.price {
4747
text-decoration: line-through;
4848
}
49+
.msrp-price-wrapper {
50+
text-decoration: none;
51+
.price-wrapper {
52+
text-decoration: line-through;
53+
}
54+
}
4955

5056
.price-tier_price {
5157
.price-including-tax + .price-excluding-tax {

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
float: left;
119119
display: inline-block;
120120
margin-right: @indent__base;
121-
overflow: hidden;
122121
.products.wrapper ~ .toolbar & {
123122
display: none;
124123
}
@@ -134,7 +133,6 @@
134133
padding: 7px 10px;
135134
line-height: 1;
136135
border-right: 0;
137-
.icon-text-hide();
138136
&:not(.active):hover {
139137
background: darken(@toolbar-element-background, 7%);
140138
.css(color, @text__color__muted);
@@ -147,7 +145,8 @@
147145
}
148146
.icon-font(
149147
@icon-grid,
150-
@_icon-font-size: @toolbar-mode-icon-font-size
148+
@_icon-font-size: @toolbar-mode-icon-font-size,
149+
@_icon-font-text-hide: true
151150
);
152151
}
153152
}

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_listings.less

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -233,23 +233,25 @@
233233

234234
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
235235
.product-item-info {
236-
.products-grid &:hover {
237-
margin: -10px;
238-
padding: 9px;
239-
border: 1px solid @color-gray-light2;
240-
@_shadow: 3px 3px 4px 0 rgba(0, 0, 0, .3);
241-
.css(box-shadow, @_shadow);
242-
position: relative;
243-
z-index: 2;
244-
.css(background, @color-white);
245-
.product-item-inner {
246-
display: block;
236+
.products-grid & {
237+
&:hover,
238+
&.active {
239+
margin: -10px;
240+
padding: 9px;
241+
border: 1px solid @color-gray-light2;
242+
@_shadow: 3px 3px 4px 0 rgba(0, 0, 0, .3);
243+
.css(box-shadow, @_shadow);
244+
position: relative;
245+
z-index: 2;
246+
.css(background, @color-white);
247+
.product-item-inner {
248+
display: block;
249+
}
247250
}
248251
}
249252
}
250253
.product-item-inner {
251254
.products-grid & {
252-
display: none;
253255
position: absolute;
254256
left: 0;
255257
right: -1px;
@@ -267,7 +269,6 @@
267269
.product-item-actions {
268270
display: block;
269271
.products-grid & {
270-
visibility: hidden;
271272
margin: -@indent__s 0 @indent__s;
272273
}
273274
.actions-primary + .actions-secondary {
@@ -282,8 +283,17 @@
282283
}
283284
}
284285
.actions-primary { display: table-cell; }
285-
.products-grid .product-item-info:hover & {
286-
visibility: visible;
286+
}
287+
288+
.products-grid {
289+
.product-item-info {
290+
&:not(:hover) {
291+
&:not(.active) {
292+
.product-item-inner {
293+
&:extend(.abs-visually-hidden-desktop-s all);
294+
}
295+
}
296+
}
287297
}
288298
}
289299

0 commit comments

Comments
 (0)