5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-14 13:06:41 +00:00

Update delete, reply, edit links to be tabable (#397)

Currently the delete, reply, and edit links on comments are skipped over when
using the tab key to flip through the various links. Adding a tabindex allows
tab to navigate to these links.
This commit is contained in:
Robert Lord 2017-09-25 21:27:13 -05:00 committed by joshua stein
parent 2460dcd2f9
commit 808877dfc2

View File

@ -64,24 +64,24 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% if comment.is_editable_by_user?(@user) %>
|
<a class="comment_editor">edit</a>
<a tabindex="0" class="comment_editor">edit</a>
<% end %>
<% if comment.is_gone? && comment.is_undeletable_by_user?(@user) %>
|
<a class="comment_undeletor">undelete</a>
<a tabindex="0" class="comment_undeletor">undelete</a>
<% elsif !comment.is_gone? && comment.is_deletable_by_user?(@user) %>
|
<% if @user && @user.is_moderator? && @user.id != comment.user_id %>
<a class="comment_moderator">delete</a>
<a tabindex="0" class="comment_moderator">delete</a>
<% else %>
<a class="comment_deletor">delete</a>
<a tabindex="0" class="comment_deletor">delete</a>
<% end %>
<% end %>
<% if @user && !comment.story.is_gone? && !comment.is_gone? %>
|
<a class="comment_replier" unselectable="on">reply</a>
<a tabindex="0" class="comment_replier" unselectable="on">reply</a>
<% end %>
<% if defined?(show_story) && show_story %>