Skip to content

Commit 9923b7a

Browse files
committed
[TAC038] Improve the follow button for screen readers
1 parent 542d3be commit 9923b7a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • decidim-core/app/cells/decidim/follow_button

decidim-core/app/cells/decidim/follow_button/show.erb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<%= button_to decidim.follow_path, class: button_classes, params: { follow: { followable_gid: model.to_sgid.to_s, inline: inline? } }, data: { disable: true }, remote: true do %>
1717
<span class="icon-wrap">
1818
<%= icon "bell", icon_options %>
19-
<%= model.followers.count %>
19+
<span aria-hidden="true"><%= model.followers.count %></span>
20+
<span class="show-for-sr"><%= t("decidim.followers.followers_count", count: model.followers.count) %></span>
2021
</span>
2122
<span class="text-wrap">
2223
<% if current_user.follows?(model.try(:participatory_space)) %>
@@ -42,7 +43,8 @@
4243
remote: true) do %>
4344
<span class="icon-wrap">
4445
<%= icon "bell", icon_options %>
45-
<%= model.followers.count %>
46+
<span aria-hidden="true"><%= model.followers.count %></span>
47+
<span class="show-for-sr"><%= t("decidim.followers.followers_count", count: model.followers.count) %></span>
4648
</span>
4749
<span class="text-wrap">
4850
<%= t("follows.create.button", scope: "decidim") %>

0 commit comments

Comments
 (0)