1
0
mirror of https://github.com/django/django.git synced 2024-12-24 10:05:46 +00:00
django/docs/ref/forms
David Smith 7f0275d8cb [5.0.x] 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 `<fieldset>` should have
`aria-describedby` added to the `<fieldset>` and not every `<input>`.

Backport of 292f1ea90f from main
2023-11-16 13:27:18 +01:00
..
api.txt [5.0.x] Added missing pycon directives in various docs. 2023-10-25 12:27:56 +02:00
fields.txt [5.0.x] Refs #32819 -- Used auto_id instead of id_for_label as unique identifier for the field. 2023-11-16 13:27:18 +01:00
formsets.txt
index.txt
models.txt Removed versionadded/changed annotations for 4.1. 2023-01-17 11:49:15 +01:00
renderers.txt Fixed typos in docs/ref/forms/renderers.txt. 2023-03-24 12:54:47 +01:00
validation.txt Fixed #34140 -- Reformatted code blocks in docs with blacken-docs. 2023-03-01 13:03:56 +01:00
widgets.txt Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03:00