Improve icon to remove investment from ballot

Note we're absolutely positioning the link instead of the icon; that way
keyboard users will be able to focus on the icon. Until now, users would
focus on an empty link.

For the same reason, we couldn't use `click_link` with Capybara, since
it would fail to click an empty link. Now we can.

Co-authored-by: Javi Martín <javim@elretirao.net>
This commit is contained in:
Alberto
2020-05-16 06:07:41 +02:00
committed by Javi Martín
parent 8be7abe5fd
commit 896fee6e99
3 changed files with 13 additions and 25 deletions

View File

@@ -5,11 +5,10 @@
<% if budget.balloting? %>
<%= link_to delete_path,
title: t("budgets.ballots.show.remove"),
class: "remove-investment-project",
class: "remove-budget-investment",
method: :delete,
remote: true do %>
<span class="show-for-sr"><%= t("budgets.ballots.show.remove") %></span>
<span class="icon-x"></span>
<% end %>
<% end %>
</li>