{{- _('Access tokens for private engines') -}}
From 8b8d830fd367386c5f06ae5a427028dc12642cd1 Mon Sep 17 00:00:00 2001
From: Markus
Date: Sun, 15 Sep 2024 17:08:57 +0200
Subject: [PATCH 2/9] [fix] simple template: add ID to elements used for
aria-labelledby
The ``aria-labelledby`` [1] attribute identifies the element that labels the
element it is applied to. The templates ``infinite_scroll.html`` and
``search_on_category_select.html`` define a ``aria-labelledby`` at the
tag but miss the id in the
{{- _('Perform search immediately if a category selected. Disable to select multiple categories') -}}
{{- '' -}}
{{- '' -}}
\ No newline at end of file
From 5ad0214bd42f6615fd0b171a96519ba55d826315 Mon Sep 17 00:00:00 2001
From: Markus
Date: Sun, 15 Sep 2024 17:14:52 +0200
Subject: [PATCH 3/9] [fix] simple template: macro checkbox_onoff_reversed
In its previous implementation, the macro ``checkbox_onoff_reversed`` always
created an ``aria-labelledby`` attribute, even if there was no descriptive tag
with the generated ID (used as the value of the ``aria-labelledby``).
Before this patch, the Nu-HTML-Checker [1] reported 255 issues of this type::
The aria-labelledby attribute must point to an element in the same document. (255)
[1] https://validator.w3.org/nu/
Signed-off-by: Markus
---
searx/templates/simple/preferences.html | 8 ++++----
searx/templates/simple/preferences/answerers.html | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index 5b72d5f9e..c04d442f2 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -27,11 +27,11 @@
{%- endif -%}
{%- endmacro -%}
-{%- macro checkbox_onoff_reversed(name, checked) -%}
+{%- macro checkbox_onoff_reversed(name, checked, labelledby) -%}
{%- endmacro -%}
@@ -42,9 +42,9 @@