Skip to content

Commit

Permalink
fixed aria-label for list-item view v.2
Browse files Browse the repository at this point in the history
  • Loading branch information
“bc-yevhenii-buliuk” committed Oct 11, 2021
1 parent bf84103 commit 02faf6a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## Draft
- Prices should not appear if the value is set to "Hidden for guests". [#2068](https://github.com/bigcommerce/cornerstone/pull/2068)
- Hide prices for aria-label and data-product-price attributes if set to "Hidden for guests". [#2131](https://github.com/bigcommerce/cornerstone/pull/2131)
- Added settings for payment banners. [#2021](https://github.com/bigcommerce/cornerstone/pull/2021)
- Use https:// for schema markup. [#2039](https://github.com/bigcommerce/cornerstone/pull/2039)
- Update focus tooltip styles contrast to achieve accessibility AA Complaince. [#2047](https://github.com/bigcommerce/cornerstone/pull/2047)
Expand Down
12 changes: 8 additions & 4 deletions templates/components/products/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
{{/each}}"
data-product-brand="{{brand.name}}"
data-product-price="
{{#if price.with_tax}}
{{price.with_tax.value}}
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
{{#if price.with_tax}}
{{price.with_tax.value}}
{{else}}
{{price.without_tax.value}}
{{/if}}
{{else}}
{{price.without_tax.value}}
{{/if}}"
Log in for pricing
{{/or}}"
{{/if}}>
<figure class="card-figure">
{{#if stock_level '===' 0}}
Expand Down
11 changes: 10 additions & 1 deletion templates/components/products/list-item.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{{#if settings.data_tag_enabled}}
<article class="listItem" data-event-type="{{event}}" data-entity-id="{{id}}" data-position="{{position}}" data-name="{{name}}" data-product-category="{{#each category}}{{#if @last}}{{this}}{{else}}{{this}}, {{/if}}{{/each}}" data-product-brand="{{brand.name}}" data-product-price="{{#if price.with_tax}}{{price.with_tax.value}}{{else}}{{price.without_tax.value}}{{/if}}">
<article class="listItem" data-event-type="{{event}}" data-entity-id="{{id}}" data-position="{{position}}" data-name="{{name}}" data-product-category="{{#each category}}{{#if @last}}{{this}}{{else}}{{this}}, {{/if}}{{/each}}" data-product-brand="{{brand.name}}" data-product-price="
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
{{#if price.with_tax}}
{{price.with_tax.value}}
{{else}}
{{price.without_tax.value}}
{{/if}}
{{else}}
Log in for pricing
{{/or}}">
{{else}}
<article class="listItem">
{{/if}}
Expand Down
13 changes: 12 additions & 1 deletion templates/components/products/product-view.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<div class="productView" {{#if settings.data_tag_enabled}} data-event-type="product" data-entity-id="{{product.id}}" data-name="{{product.title}}" data-product-category="{{#each product.category}}{{#if @last}}{{this}}{{else}}{{this}}, {{/if}}{{/each}}" data-product-brand="{{product.brand.name}}" data-product-price="{{#if product.price.with_tax}}{{product.price.with_tax.value}}{{else}}{{product.price.without_tax.value}}{{/if}}" data-product-variant="single-product-option"{{/if}}>
<div class="productView" {{#if settings.data_tag_enabled}} data-event-type="product" data-entity-id="{{product.id}}" data-name="{{product.title}}" data-product-category="{{#each product.category}}{{#if @last}}{{this}}{{else}}{{this}}, {{/if}}{{/each}}" data-product-brand="{{product.brand.name}}"
data-product-price="
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
{{#if product.price.with_tax}}
{{product.price.with_tax.value}}
{{else}}
{{product.price.without_tax.value}}
{{/if}}
{{else}}
Log in for pricing
{{/or}}"
data-product-variant="single-product-option"{{/if}}>
{{#each product.reviews.messages}}
{{#if error}}
{{> components/common/alert/alert-error error}}
Expand Down

0 comments on commit 02faf6a

Please sign in to comment.