[Django] #32765: Label for ReadOnlyPasswordHashWidget points to non-existent HTML ID

24 views
Skip to first unread message

Django

unread,
May 18, 2021, 11:59:27 PM5/18/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-existent HTML ID
-----------------------------------------+------------------------
Reporter: David Sanders | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
In the admin, the label element for the `ReadOnlyPasswordHashWidget`
widget has a 'for' attribute which points to a non-existent HTML ID, since
the widget just renders text, not an input. There's no labelable element
for the widget, so the label shouldn't have a 'for' attribute.

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

Django

unread,
May 19, 2021, 12:06:06 AM5/19/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-existent HTML ID
-------------------------------+--------------------------------------

Reporter: David Sanders | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by David Sanders):

* has_patch: 0 => 1


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

Django

unread,
May 19, 2021, 2:05:15 AM5/19/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-labelable element.
--------------------------------------+------------------------------------

Reporter: David Sanders | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Bug => Cleanup/optimization
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Agreed, currently it's associated with `<div>` which is not a labelable
element, see [https://html.spec.whatwg.org/multipage/forms.html#attr-
label-for spec].

[https://github.com/django/django/pull/14411 PR]

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

Django

unread,
May 19, 2021, 12:46:40 PM5/19/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-labelable element.
--------------------------------------+------------------------------------

Reporter: David Sanders | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: 3.2

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by David Sanders:

Old description:

> In the admin, the label element for the `ReadOnlyPasswordHashWidget`
> widget has a 'for' attribute which points to a non-existent HTML ID,
> since the widget just renders text, not an input. There's no labelable
> element for the widget, so the label shouldn't have a 'for' attribute.

New description:

In the admin, the label element for the `ReadOnlyPasswordHashWidget`

widget has a 'for' attribute which points to a non-labelable element,


since the widget just renders text, not an input. There's no labelable
element for the widget, so the label shouldn't have a 'for' attribute.

--

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

Django

unread,
May 19, 2021, 2:27:53 PM5/19/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-labelable element.
-------------------------------------+-------------------------------------
Reporter: David Sanders | Owner: David
Type: | Sanders
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => David Sanders
* status: new => assigned
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin


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

Django

unread,
May 19, 2021, 4:10:55 PM5/19/21
to django-...@googlegroups.com
#32765: Label for ReadOnlyPasswordHashWidget points to non-labelable element.
-------------------------------------+-------------------------------------
Reporter: David Sanders | Owner: David
Type: | Sanders
Cleanup/optimization | Status: closed
Component: contrib.auth | Version: 3.2
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"536c155e67fd82ef23975919bd55ccec966f96f8" 536c155e]:
{{{
#!CommitTicketReference repository=""
revision="536c155e67fd82ef23975919bd55ccec966f96f8"
Fixed #32765 -- Removed "for" HTML attribute from
ReadOnlyPasswordHashWidget.

ReadOnlyPasswordHashWidget doesn't have any labelable elements.
}}}

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

Reply all
Reply to author
Forward
0 new messages