#27565: {{ form.as_p }} with RadioSelect generates invalid HTML
-------------------------------------+-------------------------------------
               Reporter:  Maciej     |          Owner:  nobody
  Olko                               |
                   Type:  Bug        |         Status:  new
              Component:  Forms      |        Version:  1.10
               Severity:  Normal     |       Keywords:  RadioSelect,
           Triage Stage:             |  invalid html, ul
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  1          |
-------------------------------------+-------------------------------------
 When working with forms, RadioSelect with {{ form.as_p }} renders to:
 {{{
 <p>
     <label for="…">…</label>
     <ul id="…>
         <li><label for="…"><input id="…" name="…" type="radio" value="…"
 required /> …</label></li>
         <li><label for="…"><input id="…" name="…" type="radio" value="…"
 required /> …</label></li>
         …
     </ul>
 </p>
 }}}
 which is totally invalid. Vide http://stackoverflow.com/questions/10601345
 /ul-element-can-never-be-a-child-of-p-element .
 It should render to:
 {{{
 <p>
     <label for="…">…</label>
 </p>
 <ul id="…>
     <li><label for="…"><input id="…" name="…" type="radio" value="…"
 required /> …</label></li>
     <li><label for="…"><input id="…" name="…" type="radio" value="…"
 required /> …</label></li>
     …
 </ul>
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27565>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.86ded8999a087cda137384088447bd26%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to