diff options
| author | David Smith <smithdc@gmail.com> | 2021-05-14 08:46:22 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-04 08:28:25 +0200 |
| commit | d8c17aa10c7f41e692fb6f5d0bf2fab7a90b9374 (patch) | |
| tree | 55cbc18efeeca4c839a51f11cc37e611dd0964e9 /docs/intro/tutorial04.txt | |
| parent | 0393b9262dcf1b8302d35a8a470e14837ca1300b (diff) | |
Refs #32338 -- Improved accessibility of RadioSelect examples in docs.
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Diffstat (limited to 'docs/intro/tutorial04.txt')
| -rw-r--r-- | docs/intro/tutorial04.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index 414156b56c..4dae8892ae 100644 --- a/docs/intro/tutorial04.txt +++ b/docs/intro/tutorial04.txt @@ -20,16 +20,16 @@ tutorial, so that the template contains an HTML ``<form>`` element: .. code-block:: html+django :caption: polls/templates/polls/detail.html - <h1>{{ question.question_text }}</h1> - - {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %} - <form action="{% url 'polls:vote' question.id %}" method="post"> {% csrf_token %} - {% for choice in question.choice_set.all %} - <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}"> - <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br> - {% endfor %} + <fieldset> + <legend><h1>{{ question.question_text }}</h1></legend> + {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %} + {% for choice in question.choice_set.all %} + <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}"> + <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br> + {% endfor %} + </fieldset> <input type="submit" value="Vote"> </form> |
