summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/code.html
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-06-28 20:40:48 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-06-28 20:41:42 +0200
commitb51d4ec041c59001f8365904d799b5188ec60c3c (patch)
tree729ab615cd98554c7f919103de71ee029b80abe9 /searx/templates/oscar/result_templates/code.html
parentf9f5974968ce767c24eea8c8a651d0e3945fc01b (diff)
downloadsearxng-b51d4ec041c59001f8365904d799b5188ec60c3c.tar.gz
searxng-b51d4ec041c59001f8365904d799b5188ec60c3c.zip
[fix] add aria labels to result links - #350
Diffstat (limited to 'searx/templates/oscar/result_templates/code.html')
-rw-r--r--searx/templates/oscar/result_templates/code.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html
index a1c18a6b7..c7d93e2b3 100644
--- a/searx/templates/oscar/result_templates/code.html
+++ b/searx/templates/oscar/result_templates/code.html
@@ -1,11 +1,11 @@
-{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context%}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
-{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
+{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} aria-labelledby="result-{{loop.index}}">{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}