Skip to content

Commit

Permalink
Merge pull request #5058 from matsuoshi/feature/add-img-alt
Browse files Browse the repository at this point in the history
商品一覧・商品詳細ページの商品画像 imgタグに、alt属性を追加
  • Loading branch information
chihiro-adachi authored Jul 2, 2021
2 parents 48c6ca6 + 63c0629 commit 6d824a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Eccube/Resource/template/default/Product/detail.twig
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ file that was distributed with this source code.

<div class="item_visual">
{% for ProductImage in Product.ProductImage %}
<div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}"></div>
<div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}"></div>
{% else %}
<div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}"/></div>
<div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" /></div>
{% endfor %}
</div>
<div class="item_nav">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}"></div>
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt=""></div>
{% endfor %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Product/list.twig
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ file that was distributed with this source code.
<li class="ec-shelfGrid__item">
<a href="{{ url('product_detail', {'id': Product.id}) }}">
<p class="ec-shelfGrid__item-image">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" loading="lazy">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" loading="lazy">
</p>
<p>{{ Product.name }}</p>
{% if Product.description_list %}
Expand Down

0 comments on commit 6d824a0

Please sign in to comment.