Skip to content
Snippets Groups Projects
Commit 52619ae2 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Better external links

parent a6e2ab2e
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,11 @@ class Static::Html < Static::Default
end
end
# Each external link needs a <span class="sr-only"> - lien externe</span> in it
# Each external link needs a <span class="sr-only">(lien externe)</span> in it
# https://github.com/osunyorg/admin/issues/2151
def add_html_tags_to_external_links!
hint = I18n.t('html.external_link', locale: locale)
span = "<span class=\"sr-only\"> - #{hint}</span>"
span = " <span class=\"sr-only\">(#{hint})</span>"
@doc.css('a[target=_blank]').each do |link|
link << span
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment