Merge pull request #1107 from consul/accessibility

Accessibility
This commit is contained in:
Enrique García
2016-05-10 11:23:22 +02:00
9 changed files with 27 additions and 13 deletions

View File

@@ -88,7 +88,7 @@ a {
}
&:focus {
outline: 0;
outline: 3px solid #ffbf47;
}
}
@@ -656,6 +656,10 @@ form.locale-form {
padding-left: rem-calc(3);
padding-right: $line-height;
width: auto;
&:focus {
outline: 3px solid #ffbf47;
}
}
}
}

View File

@@ -192,7 +192,7 @@
.button-support {
background: white;
color: $proposals;
color: $text;
display: inline-block;
font-size: $small-font-size;
margin-top: rem-calc(12);

View File

@@ -0,0 +1,7 @@
module AccessibilityHelper
def css_for_aria_hidden(reason)
reason.present? ? "true" : ""
end
end

View File

@@ -22,20 +22,20 @@
</span>
<% if user_signed_in? && current_user.organization? %>
<div class="organizations-votes" style='display:none'>
<div class="organizations-votes" style='display:none' aria-hidden="false">
<p>
<%= t("votes.organizations") %>
</p>
</div>
<% elsif user_signed_in? && !debate.votable_by?(current_user)%>
<div class="anonymous-votes" style='display:none'>
<div class="anonymous-votes" style='display:none' aria-hidden="false">
<p>
<%= t("votes.anonymous",
verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
</p>
</div>
<% elsif !user_signed_in? %>
<div class="not-logged" style='display:none'>
<div class="not-logged" style='display:none' aria-hidden="false">
<%= t("votes.unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>

View File

@@ -1,6 +1,6 @@
<div class="sidebar-divider"></div>
<h3 class="sidebar-title"><%= t("shared.tags_cloud.districts") %></h3>
<br>
<%= link_to map_proposals_path, id: 'map' do %>
<%= image_tag("map.jpg") %>
<%= link_to map_proposals_path, id: 'map', title: t("shared.tags_cloud.districts_list") do %>
<%= image_tag("map.jpg", alt: t("shared.tags_cloud.districts_list")) %>
<% end %>

View File

@@ -31,20 +31,20 @@
</div>
<% if user_signed_in? && current_user.organization? %>
<div class="organizations-votes" style='display:none'>
<div class="organizations-votes" style='display:none' aria-hidden="false">
<p>
<%= t("votes.organizations") %>
</p>
</div>
<% elsif user_signed_in? && !proposal.votable_by?(current_user)%>
<div class="anonymous-votes" style='display:none'>
<div class="anonymous-votes" style='display:none' aria-hidden="false">
<p>
<%= t("votes.verified_only",
verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
</p>
</div>
<% elsif !user_signed_in? %>
<div class="not-logged" style='display:none'>
<div class="not-logged" style='display:none' aria-hidden="false">
<%= t("votes.unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>

View File

@@ -16,14 +16,15 @@
<% elsif voting_allowed %>
<%= link_to vote_url,
class: "button button-support small expanded",
title: t('spending_proposals.spending_proposal.support_title'), method: "post", remote: true do %>
title: t('spending_proposals.spending_proposal.support_title'), method: "post", remote: true,
"aria-hidden" => css_for_aria_hidden(reason) do %>
<%= t("spending_proposals.spending_proposal.support") %>
<% end %>
<% end %>
</div>
<% if reason.present? && !user_voted_for %>
<div class="no-supports-allowed" style='display:none'>
<div class="no-supports-allowed" style='display:none' aria-hidden="false">
<p>
<%= t("votes.spending_proposals.#{reason}",
verify_account: link_to(t("votes.verify_account"), verification_path),

View File

@@ -409,6 +409,7 @@ en:
tags_cloud:
tags: Trending
districts: "Districts"
districts_list: "Districts list"
categories: "Categories"
target_blank_html: " (link opens in new window)"
unflag: Unflag

View File

@@ -409,6 +409,7 @@ es:
tags_cloud:
tags: Tendencias
districts: "Distritos"
districts_list: "Listado de distritos"
categories: "Categorías"
target_blank_html: " (se abre en ventana nueva)"
unflag: Deshacer denuncia