summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/forms/fields.txt6
-rw-r--r--docs/releases/5.0.txt6
-rw-r--r--docs/topics/forms/index.txt2
3 files changed, 7 insertions, 7 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index df9732f1af..9dff2d4007 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -283,9 +283,9 @@ fields. We've specified ``auto_id=False`` to simplify the output:
<div>Sender:<div class="helptext">A valid email address, please.</div><input type="email" name="sender" required></div>
<div>Cc myself:<input type="checkbox" name="cc_myself"></div>
-When a field has help text and :attr:`~django.forms.BoundField.id_for_label`
-returns a value, we associate ``help_text`` with the input using the
-``aria-describedby`` HTML attribute:
+When a field has help text and the widget is not rendered in a ``<fieldset>``,
+``aria-describedby`` is added to the ``<input>`` to associate it to the
+help text:
.. code-block:: pycon
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index db75a6b0a3..269e3b382e 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -61,7 +61,7 @@ For example, the template below:
<div>
{{ form.name.label_tag }}
{% if form.name.help_text %}
- <div class="helptext" id="{{ form.name.id_for_label }}_helptext">
+ <div class="helptext" id="{{ form.name.auto_id }}_helptext">
{{ form.name.help_text|safe }}
</div>
{% endif %}
@@ -71,7 +71,7 @@ For example, the template below:
<div class="col">
{{ form.email.label_tag }}
{% if form.email.help_text %}
- <div class="helptext" id="{{ form.email.id_for_label }}_helptext">
+ <div class="helptext" id="{{ form.email.auto_id }}_helptext">
{{ form.email.help_text|safe }}
</div>
{% endif %}
@@ -81,7 +81,7 @@ For example, the template below:
<div class="col">
{{ form.password.label_tag }}
{% if form.password.help_text %}
- <div class="helptext" id="{{ form.password.id_for_label }}_helptext">
+ <div class="helptext" id="{{ form.password.auto_id }}_helptext">
{{ form.password.help_text|safe }}
</div>
{% endif %}
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 %}
- <p class="help" id="{{ field.id_for_label }}_helptext">
+ <p class="help" id="{{ field.auto_id }}_helptext">
{{ field.help_text|safe }}
</p>
{% endif %}