Screen reader: Use heading for comments navigation

This commit is contained in:
Jason Zimdars
2025-07-02 14:22:16 -05:00
parent 08043a7c5e
commit 91aa8be4fc
2 changed files with 17 additions and 9 deletions
+8 -2
View File
@@ -37,8 +37,14 @@
}
.comment__author {
.comment--system & strong {
display: none;
.comment--system & {
h3 {
margin-inline: auto;
}
strong {
display: none;
}
}
.btn {
+9 -7
View File
@@ -8,14 +8,16 @@
<div class="comment__content flex flex-column flex-item-grow full-width">
<div class="comment__author flex align-center gap-half">
<strong>
<%= link_to comment.creator.name, comment.creator, class: "txt-ink btn btn--plain fill-transparent", data: { turbo_frame: "_top" } %>
</strong>
<h3 class="font-weight-normal txt-normal flex-item-justify-start">
<strong>
<%= link_to comment.creator.name, comment.creator, class: "txt-ink btn btn--plain fill-transparent", data: { turbo_frame: "_top" } %>
</strong>
<%= link_to comment, class: "txt-undecorated txt-ink translucent txt-normal txt-capitalize flex-item-justify-start" do %>
<%= local_datetime_tag comment.created_at, style: :agoorweekday %>,
<%= local_datetime_tag comment.created_at, style: :time %>
<% end %>
<%= link_to comment, class: "txt-undecorated txt-ink translucent txt-normal txt-capitalize" do %>
<%= local_datetime_tag comment.created_at, style: :agoorweekday %>,
<%= local_datetime_tag comment.created_at, style: :time %>
<% end %>
</h3>
<%= link_to edit_card_comment_path(comment.card, comment),
class: "comment__edit btn btn--circle borderless fill-transparent translucent" do %>