[Django] #32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering helpers

17 views
Skip to first unread message

Django

unread,
Jan 10, 2021, 3:59:50 PM1/10/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud | Owner: nobody
Colas |
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords: accessibility,
Triage Stage: | forms, wcag
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
The Django forms API has three methods available to render whole forms at
once: `as_table`, `as_ul`, `as_p`. All of these three have issues of
varying severity. Although it’s not always the case that developers rely
on those methods when implementing forms, I think it’s important for
Django to not provide APIs that make it easy for developers to do the
wrong thing – just like with security, Django should have safe defaults.

Like [https://code.djangoproject.com/ticket/32338 #32338] – those issues
are with the vanilla rendering of forms, and also with related
documentation code snippets. If you want to troubleshoot this, here is the
form I used for testing:

- Live form as_p: ​http://django-admin-
tests.herokuapp.com/forms/example_form/p/
- Live form as_ul: ​http://django-admin-
tests.herokuapp.com/forms/example_form/ul/
- Live form as_table: http://django-admin-
tests.herokuapp.com/forms/example_form/table/
- Form fields definitions:
https://github.com/thibaudcolas/django_admin_tests/blob/main/django_admin_tests/forms.py
- Template:
https://github.com/thibaudcolas/django_admin_tests/blob/main/django_admin_tests/templates/django_admin_tests/example_form.html

== as_table

`as_table` is the most problematic of all form output styles. Although
technically tables for layout can be ok (see WebAIM’s
[https://webaim.org/techniques/tables/ Creating Accessible Tables]), I
think the general consensus is that they should be a thing of the past.
Depending on how screen readers interpret the markup, there is a very real
chance that they will incorrectly announce the table with tabular
navigation, made for tabular data. This will make the form at best very
verbose to navigate, at worst plain confusing.

There are well-established workarounds to this keep on using tables like
this (like adding [https://w3c.github.io/aria-practices/#presentation_role
role="presentation"] to the `<table>`), but there really is no reason to
use tables for layout these days, as identical or better layouts can be
done with CSS (for example for a responsive form). I think this can also
potentially be a source of confusion for developers – so Django shouldn’t
encourage potentially-misused markup.

== as_ul

`as_ul` essentially has the same problem as `as_table` but to a lesser
extent. Wrapping whole forms in list items makes the form more verbose to
navigate, and can be a bit confusing, but that’s about it. Semantically
it’s also incorrect (unordered lists means the order of items doesn’t
matter). I don’t think it’s very problematic, but it’s also not very
useful to start with.

== as_p

The `as_p` markup doesn’t cause any accessibility issues that I’m aware
of, but it can be problematic nonetheless because `p` only allows
[https://developer.mozilla.org/en-
US/docs/Web/Guide/HTML/Content_categories#phrasing_content phrasing
content] (see for example [https://code.djangoproject.com/ticket/31189
#31189]).

From a pure "end-user outcome" perspective there is no problem with this
to my knowledge, but again I think Django should err on the side of safe
defaults and not encourage patterns that can lead to invalid HTML, when
developers use custom widgets that would contain tags invalid in phrasing
content (for example a date picker). Even if browsers handle the invalid
HTML just fine, it’s very common for accessibility testing tools to
implement HTML validation rules, and Django should strive to minimize
false positives with those tools if there are obvious alternatives.

== Proposed solution

I would recommend removing all three output styles. Even if their output
can be tweaked to circumvent those issues, they make it too easy to do the
wrong thing. They also discourage developers from using `<fieldset>` and
`<legend>` to appropriately group related fields. Although this isn’t
needed all the time, for larger forms it’s important for there to be clear
sections.

If Django wants to provide a shortcut to render whole forms, I think it
should be based on `<div>` (optionally with a class name), so it still
allows for layout niceties but works as expect for all users otherwise. I
think the documentation should also be updated to cover why it’s also
desirable to render fields individually so they can be grouped in
sections.

---

I realize this would be a breaking change, with a lengthy deprecation
period. During this deprecation period, it would also be great to:

- Document the gotchas with the three shortcuts.
- Recommend marking up `<table>` and `<ul>` with [https://w3c.github.io
/aria-practices/#presentation_role role="presentation"], so screen readers
ignore the semantics.

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

Django

unread,
Jan 12, 2021, 7:02:49 AM1/12/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody

Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:

Keywords: accessibility, | Triage Stage:
forms, wcag | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Description changed by Thibaud Colas:

Old description:

> practices/#presentation_role role="presentation"] to the `<table>`), but

New description:

== as_table

== as_ul

== as_p

== Proposed solution

sections. I think they also have an impact on how likely developers are to
properly label fields as either required or optional where relevant –
Django’s default output has no such labeling, so developers either have to
remember to add a custom label for each field suffixed with `(required)`,
or skip those output styles.

If Django wants to provide a shortcut to render whole forms, I think it
should be based on `<div>` (optionally with a class name), so it still
allows for layout niceties but works as expect for all users otherwise. I
think the documentation should also be updated to cover why it’s also
desirable to render fields individually so they can be grouped in
sections.

---

I realize this would be a breaking change, with a lengthy deprecation
period. During this deprecation period, it would also be great to:

- Document the gotchas with the three shortcuts.
- Recommend marking up `<table>` and `<ul>` with [https://w3c.github.io
/aria-practices/#presentation_role role="presentation"], so screen readers
ignore the semantics.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:1>

Django

unread,
Jan 14, 2021, 9:43:41 AM1/14/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody

Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

Hi Thibaud, thanks for this.

Let's accept, with the proviso that I don't think we can really
remove/deprecate the `as_p()` &co methods — they're just too widely used.
We can steer folks to better methods, improve the markup as best we can,
and add the `role=presentation` I think without issue, but there's just
too much code out there (I think) to remove them.

One issue we have is breaking peoples existing pages if we change the
rendered HTML (so that CSS/JS selectors change for instance).
Can I point you to #31026, which is on my list for early in the 4.0 (i.e.
next) cycle. If we can get that in, then we'd be able to document a ''Use
this template ... to restore the previous HTML'', which then would give us
room to introduce a more significant change.

I hope that makes sense 😀

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:2>

Django

unread,
Jan 15, 2021, 11:22:54 AM1/15/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody

Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Thibaud Colas):

Thank you Carlton, that makes complete sense to me.
[https://code.djangoproject.com/ticket/31026 #31026] sounds very promising
to solve this, particularly the "Use this template to restore the previous
behavior" scenario. I’ll take a look and see whether I can provide a more
detailed proposal.

Re whether the breakage is worth it or not – I think it’s worth me
expressing more nuance between the different methods:

- `as_p` isn’t something I would recommend, and isn’t something I think
Django should recommend, but it’s not actively causing big issues for end
users that Django could solve by removing it. All the removal would
achieve is increased awareness of how to implement forms better, but it’s
not like that can’t be achieved otherwise, and `as_p` being gone doesn’t
guarantee better patterns will be used.
- `as_table` on the other hand results in forms that are confusing for
screen reader users, and would fail an accessibility audit.
- `as_ul` is somewhere in-between.


---

For `role=presentation` – as far as I understand this would be a
documentation change only. Is this something you think we could be doing
right now? If so I might also spend more time reviewing other potential
accessibility improvements to code snippets in the documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:3>

Django

unread,
Jan 24, 2021, 4:37:21 AM1/24/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody

Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tom Carrick):

I think the easiest / quickest / least trouble-causing thing to do here is
to put a big warning in the docs along the lines of "These methods are
suitable only for quickly testing forms and shouldn't be used in
production code because, x, y and z" along with perhaps a note on the role
attr as a quick fix for old code.

I agree we probably can't remove them, but we could at least do this as a
first step, along with making them more accessible where possible.

In the future? I'm not sure, I defer to Carlton, and I think his
suggestion re: the form templates is good. Also perhaps a system check
might work? e.g. complain if you use the methods, but it's easy enough for
people to disable.

One more extreme thought: perhaps we can do as we did with the old `{%
trans %}` and co tags -- de-document them but leave them there for old
code to use, perhaps to be removed in some far future date (or not).

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:4>

Django

unread,
Jun 4, 2021, 5:31:38 AM6/4/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: dev

Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Jacob Rief):

I'm strongly in favor of adding a new method `as_div()` together with
configurable CSS classes to the form renderer. Indeed I do this myself on
many of my own forms.
We then maybe also should let the `__str__()`-method use that new
`as_div()` method instead of `as_table()`.

– just my two cents, Jacob

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:5>

Django

unread,
Sep 8, 2021, 12:13:51 PM9/8/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new

Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by David Smith):

There is currently a comment in the `Form.as_table()` doc string which
suggested there was some work to do as there is no semantic division
between the forms. This is expected to be removed as part of the move to
template based form rendering. See
[https://github.com/django/django/pull/14819#discussion_r703057044
comment]

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:6>

Django

unread,
Dec 22, 2021, 8:51:57 AM12/22/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned

Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by David Smith):

* owner: nobody => David Smith
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:7>

Django

unread,
Dec 23, 2021, 2:20:09 AM12/23/21
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"cb82ded4b26f514c11349c9d13287bb3fb9268c9" cb82ded4]:
{{{
#!CommitTicketReference repository=""
revision="cb82ded4b26f514c11349c9d13287bb3fb9268c9"
Refs #32339 -- Added rendering tests for forms with CheckboxSelectMultiple
and SelectMultiple widgets.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:8>

Django

unread,
Mar 16, 2022, 6:39:25 AM3/16/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/15317 Current PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:9>

Django

unread,
Mar 29, 2022, 10:35:13 AM3/29/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Ready for
forms, wcag | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:10>

Django

unread,
Mar 30, 2022, 10:29:27 AM3/30/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Ready for
forms, wcag | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"c8459708a7e0a2474255b77d0f104a7f16e8b32c" c8459708]:
{{{
#!CommitTicketReference repository=""
revision="c8459708a7e0a2474255b77d0f104a7f16e8b32c"
Refs #32339 -- Added use_fieldset to Widget.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:11>

Django

unread,
Mar 30, 2022, 11:49:06 AM3/30/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:12>

Django

unread,
Mar 30, 2022, 11:49:26 AM3/30/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:13>

Django

unread,
Apr 27, 2022, 5:00:44 AM4/27/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"832096478cf37b911688d061281348f74bf09e93" 8320964]:
{{{
#!CommitTicketReference repository=""
revision="832096478cf37b911688d061281348f74bf09e93"
Refs #32339 -- Added base form renderer to docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:14>

Django

unread,
Apr 27, 2022, 5:00:46 AM4/27/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"476d4d508717977101bba1a7f765653e48e88e76" 476d4d50]:
{{{
#!CommitTicketReference repository=""
revision="476d4d508717977101bba1a7f765653e48e88e76"
Refs #32339 -- Allowed renderer to specify default form and formset
templates.

Co-authored-by: David Smith <smi...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:15>

Django

unread,
May 4, 2022, 5:53:18 AM5/4/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"fde946daffbb007a7d033945677cc8e9e475d516" fde946da]:
{{{
#!CommitTicketReference repository=""
revision="fde946daffbb007a7d033945677cc8e9e475d516"
Refs #32339 -- Restructured outputting HTML form docs.

In the topic doc, promoted the Reusable form templates section.

In the reference, re-grouped and promoted the default __str__()
rendering path, and then gathered the various as_*() helpers
subsequently.

Thanks to David Smith for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:16>

Django

unread,
May 4, 2022, 10:24:35 AM5/4/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:17>

Django

unread,
May 5, 2022, 8:33:07 AM5/5/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed

Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ec5659382a5f5fc2daf0c87ccc89d0fb07534874" ec565938]:
{{{
#!CommitTicketReference repository=""
revision="ec5659382a5f5fc2daf0c87ccc89d0fb07534874"
Fixed #32339 -- Added div.html form template.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:18>

Django

unread,
May 17, 2022, 5:18:51 AM5/17/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"d126eba3637d84caa80fa4258e2e59ef07a8260c" d126eba]:
{{{
#!CommitTicketReference repository=""
revision="d126eba3637d84caa80fa4258e2e59ef07a8260c"
Refs #32339 -- Deprecated default.html form template.

Co-authored-by: Carlton Gibson <carlton...@noumenal.es>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:19>

Django

unread,
Dec 7, 2022, 4:49:58 AM12/7/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"9ac97e7eb5a74f813012715c7598c8608e78e178" 9ac97e7e]:
{{{
#!CommitTicketReference repository=""
revision="9ac97e7eb5a74f813012715c7598c8608e78e178"
Refs #32339 -- Updated Form API docs to prefer as_div() output style.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:20>

Django

unread,
Dec 7, 2022, 5:08:47 AM12/7/22
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"7713370f08bc5875785134052b32146ae8cfc578" 7713370]:
{{{
#!CommitTicketReference repository=""
revision="7713370f08bc5875785134052b32146ae8cfc578"
[4.1.x] Refs #32339 -- Updated Form API docs to prefer as_div() output
style.

Backport of 9ac97e7eb5a74f813012715c7598c8608e78e178 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:21>

Django

unread,
Jan 17, 2023, 5:49:44 AM1/17/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"98756c685ee173bbd43f21ed0553f808be835ce5" 98756c68]:
{{{
#!CommitTicketReference repository=""
revision="98756c685ee173bbd43f21ed0553f808be835ce5"
Refs #32339 -- Changed default form and formset rendering style to div-
based.

Per deprecation timeline.

This also removes "django/forms/default.html" and
"django/forms/formsets/default.html" templates.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:22>

Django

unread,
Jan 18, 2023, 5:08:55 AM1/18/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"b209518089131c6b4afd18b1d9c320ba3521c5ab" b209518]:
{{{
#!CommitTicketReference repository=""
revision="b209518089131c6b4afd18b1d9c320ba3521c5ab"
Refs #32339 -- Deprecated transitional form renderers.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:23>

Django

unread,
Feb 15, 2023, 3:27:18 AM2/15/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4038a8df0b8c20624ba826cf9af8f532e5a51aaa" 4038a8d]:
{{{
#!CommitTicketReference repository=""
revision="4038a8df0b8c20624ba826cf9af8f532e5a51aaa"
Refs #32339 -- Doc'd BaseFormSet.as_div()
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:24>

Django

unread,
Feb 15, 2023, 3:27:19 AM2/15/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"ce10686604de686e2bfb8ff8ead1c5604e0fbf0b" ce10686]:
{{{
#!CommitTicketReference repository=""
revision="ce10686604de686e2bfb8ff8ead1c5604e0fbf0b"
[4.2.x] Refs #32339 -- Doc'd BaseFormSet.as_div()

Backport of 4038a8df0b8c20624ba826cf9af8f532e5a51aaa from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:25>

Django

unread,
Feb 15, 2023, 3:27:31 AM2/15/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7fd69e52a53bba9a0c7f29ef283555a9cc9c7f10" 7fd69e5]:
{{{
#!CommitTicketReference repository=""
revision="7fd69e52a53bba9a0c7f29ef283555a9cc9c7f10"
[4.1.x] Refs #32339 -- Doc'd BaseFormSet.as_div()

Backport of 4038a8df0b8c20624ba826cf9af8f532e5a51aaa from main.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:26>

Django

unread,
Feb 15, 2023, 5:04:17 AM2/15/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"232b60a21b951bd16b8c95b34fcbcbf3ecd89fca" 232b60a]:
{{{
#!CommitTicketReference repository=""
revision="232b60a21b951bd16b8c95b34fcbcbf3ecd89fca"
Refs #32339 -- Updated docs to reflect default <div> style form rendering
in Django 5.0.

Follow up to 98756c685ee173bbd43f21ed0553f808be835ce5.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:27>

Django

unread,
Feb 15, 2023, 5:04:17 AM2/15/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"3cc7a92189f45eab034661359e60ede4c88a6052" 3cc7a92]:
{{{
#!CommitTicketReference repository=""
revision="3cc7a92189f45eab034661359e60ede4c88a6052"
Refs #32339 -- Doc'd setting a form's template_name is recomended over
using as_* methods.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:28>

Django

unread,
May 17, 2023, 10:12:33 AM5/17/23
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"4a5753fb0af28967c9ad6a5be8966cdbd933ad64" 4a5753fb]:
{{{
#!CommitTicketReference repository=""
revision="4a5753fb0af28967c9ad6a5be8966cdbd933ad64"
Refs #32339 -- Fixed super() call in deprecated renderers.

Missing function call `()` leads to:

TypeError: descriptor '__init__' of 'super' object needs an argument

Regression in b209518089131c6b4afd18b1d9c320ba3521c5ab.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:29>

Django

unread,
Aug 28, 2024, 10:44:14 AM8/28/24
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by nessita <124304+nessita@…>):

In [changeset:"7e6e1c8383dbb1fb543e6d1f0e5ca58fc01494c4" 7e6e1c83]:
{{{#!CommitTicketReference repository=""
revision="7e6e1c8383dbb1fb543e6d1f0e5ca58fc01494c4"
Refs #32339 -- Adjusted deprecation warning stacklevel in transitional
form renderers.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:30>

Django

unread,
Nov 18, 2024, 10:59:43 AM11/18/24
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"c56e1273a9d87ffad3a84fb597550f79b9820281" c56e127]:
{{{#!CommitTicketReference repository=""
revision="c56e1273a9d87ffad3a84fb597550f79b9820281"
Refs #32339 -- Updated formset docs to reflect default rendering as
as_div.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:31>

Django

unread,
Nov 18, 2024, 11:02:01 AM11/18/24
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"4c65aecfe7ebebf2c90f2cccb6d240cd14c1445c" 4c65aec]:
{{{#!CommitTicketReference repository=""
revision="4c65aecfe7ebebf2c90f2cccb6d240cd14c1445c"
[5.1.x] Refs #32339 -- Updated formset docs to reflect default rendering
as as_div.

Backport of c56e1273a9d87ffad3a84fb597550f79b9820281 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:32>

Django

unread,
Jan 15, 2025, 4:28:47 PMJan 15
to django-...@googlegroups.com
#32339: Accessibility issues with Django forms as_table, as_ul, as_p rendering
helpers
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: fixed
Keywords: accessibility, | Triage Stage: Accepted
forms, wcag |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"ba90b76c6e5e8731b0ba9f52a3ccc0651489ef3b" ba90b76]:
{{{#!CommitTicketReference repository=""
revision="ba90b76c6e5e8731b0ba9f52a3ccc0651489ef3b"
Refs #32339 -- Removed transitional form renderers per deprecation
timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32339#comment:33>
Reply all
Reply to author
Forward
0 new messages