Skip to content

Commit

Permalink
Add alt names to images wrapped in links
Browse files Browse the repository at this point in the history
Even if images with an empty alt are ok, if they're inside links they
should have some descriptive text.
  • Loading branch information
elia committed Jul 24, 2023
1 parent afe0e7f commit f735052
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def image_column(product)
image = product.gallery.images.first or return

link_to(
image_tag(image.url(:small), class: 'h-10 w-10 max-w-min rounded border border-gray-100', alt: ''),
image_tag(image.url(:small), class: 'h-10 w-10 max-w-min rounded border border-gray-100', alt: product.name),
spree.edit_admin_product_path(product),
class: 'inline-flex overflow-hidden',
tabindex: -1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
w-full
">
<%= link_to @store.url, class: "py-3 px-2 text-left flex" do %>
<%= image_tag @logo_path, alt: "", class: "max-h-7" %>
<%= image_tag @logo_path, alt: t('.visit_store'), class: "max-h-7" %>
<% end %>
<%= link_to @store.url, class: "flex mt-4 mb-2 px-2 py-1.5 border border-gray-100 rounded-sm shadow-sm" do %>
Expand Down
2 changes: 2 additions & 0 deletions admin/app/components/solidus_admin/sidebar/component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
en:
visit_store: Visit your store

0 comments on commit f735052

Please sign in to comment.