# HG changeset patch # User nanaya # Date 1504072345 -32400 # Node ID c9864cf35950a92bd14c40336d2e2f13001c9f8f # Parent 61414d0a367b21751756ed29803e3aa0ec8c303f Now with explicit alt text diff -r 61414d0a367b -r c9864cf35950 app/views/tweets/_tweet.html.erb --- a/app/views/tweets/_tweet.html.erb Wed Aug 23 16:35:58 2017 +0900 +++ b/app/views/tweets/_tweet.html.erb Wed Aug 30 14:52:25 2017 +0900 @@ -19,16 +19,16 @@

<%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %> - <%= image_tag tweet.user.profile_image_url_https %> + <%= image_tag tweet.user.profile_image_url_https, :alt => "profile image for #{tweet.user.name.printable}" %> <%= tweet.user.name.printable -%> <% end %>

- <% tweet.media.each do |media| %> + <% tweet.media.each_with_index do |media, i| %> <% if media.is_a? Twitter::Media::Photo %> <%= link_to "#{media.media_url_https}:orig" do %> - <%= image_tag "#{media.media_url_https}:small" -%> + <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%> <% end %> <% end %> <% end %>