diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-20 09:34:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-20 09:34:26 +0000 |
commit | eaea4e9fee7e70c6df4db5b749fbe94937bbd35c (patch) | |
tree | 2c8fff46458f1aa05d2fe6202d61319bf2024a81 /app/helpers | |
parent | e63bf1d5970cec0e63029dd1deb36539fc844dae (diff) | |
download | redmine-eaea4e9fee7e70c6df4db5b749fbe94937bbd35c.tar.gz redmine-eaea4e9fee7e70c6df4db5b749fbe94937bbd35c.zip |
Improve accessibility for icon-only links by adding hidden text (#21805).
Patch by Daniel Ritz.
git-svn-id: http://svn.redmine.org/redmine/trunk@15271 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 10 | ||||
-rw-r--r-- | app/helpers/email_addresses_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/issues_helper.rb | 5 | ||||
-rw-r--r-- | app/helpers/journals_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/watchers_helper.rb | 2 |
5 files changed, 16 insertions, 15 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7ad6caec9..f09103791 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -454,16 +454,16 @@ module ApplicationHelper end def reorder_links(name, url, method = :post) - link_to('', + link_to(l(:label_sort_highest), url.merge({"#{name}[move_to]" => 'highest'}), :method => method, :title => l(:label_sort_highest), :class => 'icon-only icon-move-top') + - link_to('', + link_to(l(:label_sort_higher), url.merge({"#{name}[move_to]" => 'higher'}), :method => method, :title => l(:label_sort_higher), :class => 'icon-only icon-move-up') + - link_to('', + link_to(l(:label_sort_lower), url.merge({"#{name}[move_to]" => 'lower'}), :method => method, :title => l(:label_sort_lower), :class => 'icon-only icon-move-down') + - link_to('', + link_to(l(:label_sort_lowest), url.merge({"#{name}[move_to]" => 'lowest'}), :method => method, :title => l(:label_sort_lowest), :class => 'icon-only icon-move-bottom') end @@ -892,7 +892,7 @@ module ApplicationHelper @current_section += 1 if @current_section > 1 content_tag('div', - link_to('', options[:edit_section_links].merge(:section => @current_section), + link_to(l(:button_edit_section), options[:edit_section_links].merge(:section => @current_section), :class => 'icon-only icon-edit'), :class => "contextual heading-#{level}", :title => l(:button_edit_section), diff --git a/app/helpers/email_addresses_helper.rb b/app/helpers/email_addresses_helper.rb index f75657cf8..81449edfa 100644 --- a/app/helpers/email_addresses_helper.rb +++ b/app/helpers/email_addresses_helper.rb @@ -22,17 +22,17 @@ module EmailAddressesHelper # Returns a link to enable or disable notifications for the address def toggle_email_address_notify_link(address) if address.notify? - link_to '', + link_to l(:label_disable_notifications), user_email_address_path(address.user, address, :notify => '0'), :method => :put, :remote => true, :title => l(:label_disable_notifications), - :class => 'icon icon-email' + :class => 'icon-only icon-email' else - link_to '', + link_to l(:label_enable_notifications), user_email_address_path(address.user, address, :notify => '1'), :method => :put, :remote => true, :title => l(:label_enable_notifications), - :class => 'icon icon-email-disabled' + :class => 'icon-only icon-email-disabled' end end end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 68b98e6c2..0d6f69913 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -442,10 +442,11 @@ module IssuesHelper # Link to the attachment if it has not been removed value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) if options[:only_path] != false && atta.is_text? - value += link_to('', + value += link_to(l(:button_view), { :controller => 'attachments', :action => 'show', :id => atta, :filename => atta.filename }, - :class => 'icon icon-magnifier') + :class => 'icon-only icon-magnifier', + :title => l(:button_view)) end else value = content_tag("i", h(value)) if value diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb index e64037f61..f9dc7c9ea 100644 --- a/app/helpers/journals_helper.rb +++ b/app/helpers/journals_helper.rb @@ -30,21 +30,21 @@ module JournalsHelper editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) links = [] if !journal.notes.blank? - links << link_to('', + links << link_to(l(:button_quote), quoted_issue_path(issue, :journal_id => journal), :remote => true, :method => 'post', :title => l(:button_quote), :class => 'icon-only icon-comment' ) if options[:reply_links] - links << link_to('', + links << link_to(l(:button_edit), edit_journal_path(journal), :remote => true, :method => 'get', :title => l(:button_edit), :class => 'icon-only icon-edit' ) if editable - links << link_to('', + links << link_to(l(:button_delete), journal_path(journal, :notes => ""), :remote => true, :method => 'put', :data => {:confirm => l(:text_are_you_sure)}, diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 389a7bacb..7ed7b8914 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -58,7 +58,7 @@ module WatchersHelper :object_id => object.id, :user_id => user} s << ' ' - s << link_to('', url, + s << link_to(l(:button_delete), url, :remote => true, :method => 'delete', :class => "delete icon-only icon-del", :title => l(:button_delete)) |