From 292f1ea90f90ff140617299a25884c8fda24aa64 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 15 Nov 2023 20:51:00 +0000 Subject: Refs #32819 -- Used auto_id instead of id_for_label as unique identifier for the field. `id_for_label` is blank for widgets with multiple inputs such as radios and multiple checkboxes. Therefore , `help_text` for fields using these widgets cannot currently be associated using `aria-describedby`. `id_for_label` is being used as a guard to avoid incorrectly adding `aria-describedby` to those widgets. This change uses `auto_id` as the unique identified for the fields `help_text`. A guard is added to avoid incorrectly adding `aria-describedby` to inputs by checking the widget's `use_fieldset` attribute. Fields rendered in a `
` should have `aria-describedby` added to the `
` and not every ``. --- docs/topics/forms/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/topics/forms') diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 7b27e98996..55d032c9bb 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -723,7 +723,7 @@ loop: {{ field.errors }} {{ field.label_tag }} {{ field }} {% if field.help_text %} -

+

{{ field.help_text|safe }}

{% endif %} -- cgit v1.3