adds text for screen readers on toggle comments
This commit is contained in:
@@ -52,5 +52,6 @@ App.Comments =
|
|||||||
children_container_id = "#{$(this).data().id}_children"
|
children_container_id = "#{$(this).data().id}_children"
|
||||||
$("##{children_container_id}").toggle('slow')
|
$("##{children_container_id}").toggle('slow')
|
||||||
App.Comments.toggle_arrow(children_container_id)
|
App.Comments.toggle_arrow(children_container_id)
|
||||||
|
$(this).children('.js-child-toggle').toggle()
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -74,7 +74,8 @@
|
|||||||
|
|
||||||
<% if comment.children.size > 0 %>
|
<% if comment.children.size > 0 %>
|
||||||
<%= link_to "", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
|
<%= link_to "", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
|
||||||
<span class="sr-only"><%= t("shared.show") %></span>
|
<span class="sr-only js-child-toggle" style="display: none;"><%= t("shared.show") %></span>
|
||||||
|
<span class="sr-only js-child-toggle"><%= t("shared.hide") %></span>
|
||||||
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
|
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
@@ -426,6 +426,7 @@ en:
|
|||||||
check_none: None
|
check_none: None
|
||||||
collective: Collective
|
collective: Collective
|
||||||
flag: Flag as inappropriate
|
flag: Flag as inappropriate
|
||||||
|
hide: Hide
|
||||||
print:
|
print:
|
||||||
print_button: Print this info
|
print_button: Print this info
|
||||||
show: Show
|
show: Show
|
||||||
|
|||||||
@@ -426,6 +426,7 @@ es:
|
|||||||
check_none: Ninguno
|
check_none: Ninguno
|
||||||
collective: Colectivo
|
collective: Colectivo
|
||||||
flag: Denunciar como inapropiado
|
flag: Denunciar como inapropiado
|
||||||
|
hide: Ocultar
|
||||||
print:
|
print:
|
||||||
print_button: Imprimir esta información
|
print_button: Imprimir esta información
|
||||||
show: Mostrar
|
show: Mostrar
|
||||||
|
|||||||
Reference in New Issue
Block a user