From 054bc1397bc9413cd5f0e2ee467a686cf68d3e18 Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Mon, 25 Jun 2018 16:09:05 -0400 Subject: [PATCH] Wrap recommendations settings checkboxes with label helper to improve A11y --- app/views/account/show.html.erb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index 64edd1ae5..a0a782f2b 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -117,19 +117,23 @@ <% if feature?("user.recommendations_on_debates") %>
- <%= f.check_box :recommended_debates, title: t("account.show.show_debates_recommendations"), label: false %> - - <%= t("account.show.show_debates_recommendations") %> - + <%= f.label :recommended_debates do %> + <%= f.check_box :recommended_debates, title: t("account.show.show_debates_recommendations"), label: false %> + + <%= t("account.show.show_debates_recommendations") %> + + <% end %>
<% end %> <% if feature?("user.recommendations_on_proposals") %>
- <%= f.check_box :recommended_proposals, title: t("account.show.show_proposals_recommendations"), label: false %> - - <%= t("account.show.show_proposals_recommendations") %> - + <%= f.label :recommended_proposals do %> + <%= f.check_box :recommended_proposals, title: t("account.show.show_proposals_recommendations"), label: false %> + + <%= t("account.show.show_proposals_recommendations") %> + + <% end %>
<% end %> <% end %>