Use CSS to show separators in moderation actions

This is useful for people using screen readers, since the character used
as a separator won't be read aloud.

Since many screen readers also read content generated via CSS
pseudoelements, we aren't using `content: "|";` or similar but using
elements with a very small width instead.
This commit is contained in:
Javi Martín
2021-12-02 21:02:01 +01:00
parent a5c66c7281
commit 3b2b09be2b
4 changed files with 27 additions and 11 deletions

View File

@@ -3,8 +3,8 @@
</span>
<% if can?(:hide, comment) || can?(:hide, comment.user) %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<% if comment.author == current_user %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<%= link_to t("comments.actions.delete"),
hide_comment_path(comment),
method: :put, remote: true, class: "delete-comment",