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 Jul 23, 2021
1 parent bf84103 commit 1f97d96
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
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 1f97d96

Please sign in to comment.