Opened 43 hours ago

Last modified 31 hours ago

#36828 assigned Bug

Django form fields render into invalid HTML — at Version 6

Reported by: Johannes Maron Owned by: Youngkwang Yang
Component: Forms Version: dev
Severity: Normal Keywords: accessibility
Cc: Johannes Maron, Antoliny Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Johannes Maron)

Howdy,

I noticed Django sometimes replaces the label with a fieldset tag. However, input labels are required as of WCAG 2.1; see also: https://www.w3.org/TR/WCAG21/#labels-or-instructions

Since Django must be WCAG2.2 AAA compliant, we might even want to patch all supported versions. However, this would mean shipping a rendering change in a bugfix.

My current impulse would be to enforce labels for WCAG compliance in 6.1, since shipping a rendering change within a bug fix release might result into more issues for users.

Cheers!
Joe

Change History (6)

comment:1 by Johannes Maron, 43 hours ago

Keywords: accessibility added

comment:2 by Johannes Maron, 43 hours ago

Description: modified (diff)

comment:3 by Youngkwang Yang, 43 hours ago

Owner: set to Youngkwang Yang
Status: newassigned

comment:4 by Youngkwang Yang, 42 hours ago

This looks similar to #36724 (fixed in PR https://github.com/django/django/pull/20080).
could you check which version you're testing with?

comment:5 by Johannes Maron, 42 hours ago

Thanks! Yes, that does resolve half of the issue. We have correct HTML, but the WCAG violation remains.

comment:6 by Johannes Maron, 42 hours ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top