diff options
| author | Markus <markus@venom.fritz.box> | 2024-09-15 17:14:52 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-09-21 15:23:21 +0200 |
| commit | 5ad0214bd42f6615fd0b171a96519ba55d826315 (patch) | |
| tree | f8e55cd0cafb0dd34f59fa20aaa7d62786b8f837 /searx/templates/simple/preferences | |
| parent | 8b8d830fd367386c5f06ae5a427028dc12642cd1 (diff) | |
[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 <markus@venom.fritz.box>
Diffstat (limited to 'searx/templates/simple/preferences')
| -rw-r--r-- | searx/templates/simple/preferences/answerers.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/templates/simple/preferences/answerers.html b/searx/templates/simple/preferences/answerers.html index 98ae61830..983646ae9 100644 --- a/searx/templates/simple/preferences/answerers.html +++ b/searx/templates/simple/preferences/answerers.html @@ -33,10 +33,10 @@ {%- for plugin in plugins -%} {%- if plugin.preference_section == 'query' -%} <tr>{{- '' -}} - <td class="checkbox-col">{{- checkbox_onoff_reversed('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}</td>{{- '' -}} + <td class="checkbox-col">{{- checkbox_onoff_reversed('plugin_' + plugin.id, plugin.id not in allowed_plugins, 'plugin_labelledby' + plugin.id) -}}</td>{{- '' -}} <td>{{ plugin.query_keywords|join(', ') }}</td>{{- '' -}} <td>{{ _(plugin.name) }}</td>{{- '' -}} - <td>{{ _(plugin.description) }}</td>{{- '' -}} + <td id="{{ 'plugin_labelledby' + plugin.id }}">{{ _(plugin.description) }}</td>{{- '' -}} <td>{{ plugin.query_examples }}</td>{{- '' -}} </tr> {%- endif -%} |