Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/2.20.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
anqaka committed May 24, 2021
2 parents a6209ae + 04d508a commit a6cdd4d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ All notable changes to this project will be documented in this file.
### Updated
### Removed


## [Released]

## [2.20.0] - 2021-05-24
### Fixed
- duplicated ids for msrp price popup (#78814)
### Added
- margin top to quote button in cart (#78684)
### Updated
- tabs component accessibility
## [2.19.3] - 2021-05-18
### Fixed
- fix product display with long names in minicart (#78748)
Expand Down
1 change: 1 addition & 0 deletions Magento_GiftRegistry/templates/cart/link.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $entityValues = $block->getEntityValues()
add
button
button--fluid
margin-bottom-m
"
>
<?= $block->escapeHtml(__('Add All To Gift Registry')) ?>
Expand Down
2 changes: 1 addition & 1 deletion Magento_Msrp/templates/product/price/msrp.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $priceElementIdPrefix = $block->getPriceElementIdPrefix() ? $block->getPriceElem
$popupId = 'msrp-popup-' . $productId . $block->getRandomString(20);
$data = [
'origin' => 'msrp',
'popupId' => '#' . $popupId,
'popupId' => $popupId,
'productName' => $block->escapeJs($block->escapeHtml($product->getName())),
'productId' => $productId,
'productIdInput' => 'input[type="hidden"][name="product"]',
Expand Down
8 changes: 6 additions & 2 deletions Magento_Msrp/web/js/msrp-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ define(['jquery'], function ($) {

initMsrpPopup: function () {
var popupDOM = $(this.options.popUpAttr)[0],
popupButton = $('#' + this.options.popupId),
$msrpPopup = $(popupDOM.innerHTML.trim()),
popupButtonId = this.options.popupId + Math.random().toString(16).slice(2),
self = this;

$msrpPopup.find(this.options.productIdInput).val(this.options.productId);
popupButton.attr('id', popupButtonId)

$msrpPopup.find(this.options.productIdInput).val(popupButtonId);
$('body').append($msrpPopup);
$msrpPopup.trigger('contentUpdated');

Expand All @@ -30,7 +34,7 @@ define(['jquery'], function ($) {
.find(this.options.paypalCheckoutButons)
.on('click', this.handleMsrpPaypalCheckout.bind(this));

$(this.options.popupId).on('click', this.openPopup.bind(this));
$('#' + popupButtonId).on('click', this.openPopup.bind(this));

this.$popup = $msrpPopup;

Expand Down
6 changes: 4 additions & 2 deletions Snowdog_Components/components/Molecules/tab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Accessibility in tabs
Our components is accordion on mobile and tabs on wider screens, so we have to implement a11y feature to be used in both cases:
* use `role="widget"` on tab element
* use `role="tablist"` on the element that serves as the container for the set of tabs
* use `role="tab"` on tab element
* use `role="tabpanel"` on tab content
* use `buttons` elements as a labels/headings of tabs
* Buttons should have following aria attributes:
* `aria-expanded` - set to `true` if tab is open, to `false` when it's closed
Expand All @@ -12,7 +14,7 @@ Our components is accordion on mobile and tabs on wider screens, so we have to i
* Tab content element should:
* have an id to be bound to tab title
* have `aria-hidden` attribute set to `true` if tab is closed and to `false` if it's open
* aria-labelledby with value of tab title id
* `aria-labelledby` with value of tab title id
* Keyboard support:
* accordions - on mobile, down & up arrow keys should move cursor between tab's titles, from first tab title up arrow should move a user to the last tab title, from last tab title down arrow should move user to first tab title.
* tabs = on desktop - right & left arrow keys should move cursor between tab's titles, from first tab title left arrow should move a user to the last tab title, from last tab title right arrow should move user to first tab title.
Expand Down
1 change: 0 additions & 1 deletion Snowdog_Components/components/Molecules/tab/_tab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
}
}


&__icon {
display: $tab__icon-display;
position: $tab__icon-position;
Expand Down
2 changes: 1 addition & 1 deletion Snowdog_Components/components/Molecules/tab/tab.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
icon: {
class: 'tab__icon',
id: 'angle-down',
iconTitle: 'Angle Down'
hidden: true
},
tabs: [
{
Expand Down

1 comment on commit a6cdd4d

@vercel
Copy link

@vercel vercel bot commented on a6cdd4d May 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.