Skip to content

Commit

Permalink
Fix accessible cart image link (#605)
Browse files Browse the repository at this point in the history
* Fix accesible cart image link:

* add cursor pointer only on JS
  • Loading branch information
tauthomas01 authored Sep 10, 2021
1 parent a70083d commit 453b181
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions assets/component-cart-items.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
}
}

.js .cart-item__image {
cursor: pointer;
}

.cart-item__details {
font-size: 1.6rem;
line-height: 1.4;
Expand Down
17 changes: 8 additions & 9 deletions sections/main-cart-items.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,14 @@
<tr class="cart-item" id="CartItem-{{ item.index | plus: 1 }}">
<td class="cart-item__media">
{% if item.image %}
<a href="{{ item.url }}">
<img class="cart-item__image"
src="{{ item.image | img_url: '300x' }}"
alt="{{ item.image.alt | escape }}"
loading="lazy"
width="150"
height="{{ 150 | divided_by: item.image.aspect_ratio | ceil }}"
>
</a>
<img class="cart-item__image"
src="{{ item.image | img_url: '300x' }}"
alt="{{ item.image.alt | escape }}"
loading="lazy"
width="150"
height="{{ 150 | divided_by: item.image.aspect_ratio | ceil }}"
onclick="window.location.href='{{ item.url }}'"
>
{% endif %}
</td>

Expand Down

0 comments on commit 453b181

Please sign in to comment.