Add a descriptive title to the series links (#1329)
It's easy to navigate each part of a series when there only a few of them. It's hard to jump from a part to another if there are many. This change makes it also a little friendlier to accessibility tools.
This commit is contained in:
parent
cf060d09e9
commit
73ddff4549
1 changed files with 3 additions and 2 deletions
|
|
@ -7,11 +7,12 @@
|
|||
<p>Part of a series</p>
|
||||
<% end %>
|
||||
<div class="article-collection">
|
||||
<% @collection.articles.where(published: true).order("published_at ASC").each_with_index do |article,i| %>
|
||||
<% @collection.articles.where(published: true).order("published_at ASC").each_with_index do |article, i| %>
|
||||
<a
|
||||
href="<%= article.path if article.published %>"
|
||||
class="<%= collection_link_class(@article,article) %>"
|
||||
class="<%= collection_link_class(@article, article) %>"
|
||||
data-preload-image="<%=cloud_cover_url(article.main_image) %>"
|
||||
title="Part <%= i + 1 %>: <%= article.title %>"
|
||||
>
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue