Skip to content

Commit

Permalink
fix(a11y): Use empty alt tag for profile image
Browse files Browse the repository at this point in the history
It's always besides text that is the actual username, making this alt text redundant.
  • Loading branch information
Mitcheljager committed Jan 31, 2025
1 parent 9ba4ec3 commit b49cbaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/profiles/_image.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if user.profile_image.attached? %>
<% begin %>
<%= image_tag rails_public_blob_url(user.profile_image.variant(quality: 95, resize_to_fill: [size, size]).processed), loading: "lazy", height: size, width: size, alt: user.username %>
<%= image_tag rails_public_blob_url(user.profile_image.variant(quality: 95, resize_to_fill: [size, size]).processed), loading: "lazy", height: size, width: size, alt: "" %>
<% rescue %>
<% end %>
<% end %>

0 comments on commit b49cbaa

Please sign in to comment.