From d46a2f9335e203633d0374e224e9fb019e7f917c Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 May 2016 15:21:20 +0200 Subject: [PATCH] Includes aria hidden attribute on support buttons --- app/helpers/accessibility_helper.rb | 7 +++++++ app/views/debates/_votes.html.erb | 6 +++--- app/views/proposals/_votes.html.erb | 6 +++--- app/views/spending_proposals/_votes.html.erb | 5 +++-- 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 app/helpers/accessibility_helper.rb diff --git a/app/helpers/accessibility_helper.rb b/app/helpers/accessibility_helper.rb new file mode 100644 index 000000000..a224f9a9b --- /dev/null +++ b/app/helpers/accessibility_helper.rb @@ -0,0 +1,7 @@ +module AccessibilityHelper + + def css_for_aria_hidden(reason) + reason.present? ? "true" : "" + end + +end diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb index a4fd722ee..9ac6638d6 100644 --- a/app/views/debates/_votes.html.erb +++ b/app/views/debates/_votes.html.erb @@ -22,20 +22,20 @@ <% if user_signed_in? && current_user.organization? %> -