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
This commit is contained in:
Jean-Philippe Lang
2016-03-20 09:34:26 +00:00
parent e63bf1d597
commit eaea4e9fee
16 changed files with 77 additions and 42 deletions

View File

@@ -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