The planned budget investments redesign includes using icons in some tables, so we might as well use them everywhere. The original design used Foundation to show the tooltips. We're using CSS in order to keep the ERB/HTML code simple. One advantage of using CSS is we can show the tooltip on focus as well, just like accessibility guidelines recommend [1]. On the other hand, Foundation tooltips appear on the sides when the link is at the bottom of the page, making sure they're visible in this case, while CSS tooltips do not. Neither CSS tooltips nor Foundation tooltips are dismissable, which might be an accessibility issue. Note we aren't changing any ERB files in order to replace links with icons; we're only changing CSS and one line of Ruby code. [1] https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus
8 lines
142 B
Ruby
8 lines
142 B
Ruby
module TableActionLink
|
|
extend ActiveSupport::Concern
|
|
|
|
def link_to(text, url, **options)
|
|
super(tag.span(text), url, options)
|
|
end
|
|
end
|