Defining a behavior on hover means making it different for people using a keyboard or a touchscreen (most of the population, nowadays). In this case, we had an accessibility issue where the message wouldn't disappear once it appeared. That meant that, after tabbing through all the links and buttons in, for instance, the debates index, the page would be filled with "participation not allowed" messages, and in order to see the information about how many people have voted, reloading the page was required. For touchscreen users the behavior was similar to what we get on hover, although we've found some inconsistencies when trying to support several elements on the same page. We think in proposals it makes sense to hide the "support" button when users click on it, and the same applies to the buttonsto support and vote investment projects. However, we aren't hiding the buttons to agree/disagree with a debate in order to keep the information about the current number of people agreeing and disagreeing visible. Note we're removing some support spec methods because after these changes the duplication isn't as obvious as it was in the past.
29 lines
902 B
Plaintext
29 lines
902 B
Plaintext
<div class="supports text-center">
|
|
<%= render "proposals/supports", proposal: proposal %>
|
|
|
|
<div class="in-favor">
|
|
<% if voted? %>
|
|
<div class="supported callout success">
|
|
<%= t("proposals.proposal.already_supported") %>
|
|
</div>
|
|
<% else %>
|
|
<%= button_to vote_url,
|
|
class: "button button-support small expanded",
|
|
title: t("proposals.proposal.support_title"),
|
|
method: "post",
|
|
remote: true,
|
|
"aria-label": support_aria_label do %>
|
|
<%= t("proposals.proposal.support") %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= render Shared::ParticipationNotAllowedComponent.new(proposal, cannot_vote_text: cannot_vote_text) %>
|
|
|
|
<% if voted? && setting["twitter_handle"] %>
|
|
<div class="share-supported">
|
|
<%= render "proposals/social_share", proposal: proposal, share_title: false %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|