From 2d33ace41083512a55b8017f525e865fb78e328e Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 May 2016 11:28:30 +0200 Subject: [PATCH 1/4] Adds styles for :focus selector --- app/assets/stylesheets/layout.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d59b33b5e..8df100359 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -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; + } } } } From 551de46105edf83de48a464886f990e9e1fc3341 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 May 2016 11:44:26 +0200 Subject: [PATCH 2/4] Changes color on button support for increase contrast color --- app/assets/stylesheets/participation.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 7ceaf7b99..ba64962e9 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -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); From ddd061a17f3c376da424a81137df4359af6b0ba6 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 May 2016 11:49:30 +0200 Subject: [PATCH 3/4] Adds alternative text for sidebar map --- app/views/proposals/_geozones.html.erb | 6 +++--- config/locales/en.yml | 1 + config/locales/es.yml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/proposals/_geozones.html.erb b/app/views/proposals/_geozones.html.erb index ccaa21e65..ceec721ce 100644 --- a/app/views/proposals/_geozones.html.erb +++ b/app/views/proposals/_geozones.html.erb @@ -1,6 +1,6 @@
-<%= link_to map_proposals_path, id: 'map' do %> - <%= image_tag("map.jpg") %> -<% end %> \ No newline at end of file +<%= 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 %> diff --git a/config/locales/en.yml b/config/locales/en.yml index fffb3de2d..62fc521c5 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/locales/es.yml b/config/locales/es.yml index 0f1a70be3..05e53fc2b 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -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 From d46a2f9335e203633d0374e224e9fb019e7f917c Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 May 2016 15:21:20 +0200 Subject: [PATCH 4/4] 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? %> -