From 32b366a86482b06db417aec67e42ca23d69da48a Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 14 May 2021 08:46:22 +0100 Subject: [3.2.x] Refs #32338 -- Improved accessibility of RadioSelect examples in docs. Co-authored-by: Thibaud Colas Backport of d8c17aa10c7f41e692fb6f5d0bf2fab7a90b9374 from main --- docs/ref/forms/widgets.txt | 85 +++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 38 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 76f7704690..bf38408368 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -727,28 +727,34 @@ that specifies the template used to render each choice. For example, for the .. code-block:: html+django - {% for radio in myform.beatles %} -
- {{ radio }} -
- {% endfor %} +
+ {{ myform.beatles.label }} + {% for radio in myform.beatles %} +
+ {{ radio }} +
+ {% endfor %} +
This would generate the following HTML: .. code-block:: html -
- -
-
- -
-
- -
-
- -
+
+ Radio buttons +
+ +
+
+ +
+
+ +
+
+ +
+
That included the ``