From 6e529f82a7521ea92549c3a1f9b8c23698ba4ef2 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 26 May 2010 22:48:35 +0000 Subject: [PATCH] Make the Gantt zoom images more accessible * Correct the alt text * Add text links next to the images * Size the images in em to support browser scaling git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3757 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 12 ++++++++---- config/locales/en.yml | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 7023d22d..60798fed 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -235,23 +235,27 @@ module IssuesHelper end def gantt_zoom_link(gantt, in_or_out) + img_attributes = {:style => 'height:1.4em; width:1.4em; margin-left: 3px;'} # em for accessibility + case in_or_out when :in if gantt.zoom < 4 - link_to_remote(image_tag('zoom_in.png'), + link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))), {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :update => 'content'}, {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))}) else - image_tag('zoom_in_g.png') + l(:text_zoom_in) + + image_tag('zoom_in_g.png', img_attributes.merge(:alt => l(:text_zoom_in))) end when :out if gantt.zoom > 1 - link_to_remote(image_tag('zoom_out.png'), + link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))), {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :update => 'content'}, {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))}) else - image_tag('zoom_out_g.png') + l(:text_zoom_out) + + image_tag('zoom_out_g.png', img_attributes.merge(:alt => l(:text_zoom_out))) end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 75601098..c3fc52ec 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -871,6 +871,8 @@ en: text_wiki_page_destroy_children: "Delete child pages and all their descendants" text_wiki_page_reassign_children: "Reassign child pages to this parent page" text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" + text_zoom_in: Zoom in + text_zoom_out: Zoom out default_role_manager: Manager default_role_developper: Developer