summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2023-11-12 17:24:16 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-11-17 08:12:36 +0100
commiteec7e9ba894a7815d289ba7446eeead488fe0e33 (patch)
tree8eed8c3d9182470731667c40758aced7f719a119 /docs
parent557fa51837a57534f8ca486133a412547a98a37e (diff)
Refs #32819 -- Established relationship between form fieldsets and their help text.
This adds aria-describedby for widgets rendered in a fieldset such as radios. aria-describedby for these widgets is added to the <fieldset> element rather than each <input>.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/forms/fields.txt11
-rw-r--r--docs/releases/5.1.txt4
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 9dff2d4007..ed685cfff6 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -283,9 +283,10 @@ 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 the widget is not rendered in a ``<fieldset>``,
-``aria-describedby`` is added to the ``<input>`` to associate it to the
-help text:
+When a field has help text it is associated with its input using the
+``aria-describedby`` HTML attribute. If the widget is rendered in a
+``<fieldset>`` then ``aria-describedby`` is added to this element, otherwise it
+is added to the widget's ``<input>``:
.. code-block:: pycon
@@ -325,6 +326,10 @@ inside ``aria-describedby``:
``aria-describedby`` was added to associate ``help_text`` with its input.
+.. versionchanged:: 5.1
+
+ ``aria-describedby`` support was added for ``<fieldset>``.
+
``error_messages``
------------------
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt
index d6c07d9c22..b90808be3c 100644
--- a/docs/releases/5.1.txt
+++ b/docs/releases/5.1.txt
@@ -138,7 +138,9 @@ File Uploads
Forms
~~~~~
-* ...
+* In order to improve accessibility and enable screen readers to associate
+ fieldsets with their help text, the form fieldset now includes the
+ ``aria-describedby`` HTML attribute.
Generic Views
~~~~~~~~~~~~~