mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 06:15:59 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user