[Django] #36553: Improve the semantic structure of admin widgets.

9 views
Skip to first unread message

Django

unread,
Aug 14, 2025, 10:47:26 PMAug 14
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Type:
| Cleanup/optimization
Status: new | Component:
| contrib.admin
Version: 5.2 | Severity: Normal
Keywords: accessibility | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Some of the widgets currently in the admin use `<p>` tags as their wrapper
elements.

-
[https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/widgets/date.html
Date Field]
-
[https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/widgets/time.html
Time Field]
-
[https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/widgets/split_datetime.html
DateTime Field]
-
[https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/widgets/url.html
URL Field]

The current structure uses `<p>` tags, and for fields that can span
multiple lines, such as `DateTime` and `URL` fields, `<br>` tags are used
to provide visual line breaks.
Since `<p>` tags represent paragraphs, they are not suitable as wrappers
for elements containing inputs, as is the case here. I believe this tag
should be changed to a `<div>`.
Additionally, `<br>` tags are used for visual line breaks, but it would be
more appropriate to remove them and implement the spacing using CSS.
--
Ticket URL: <https://code.djangoproject.com/ticket/36553>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 15, 2025, 3:30:47 AMAug 15
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

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

Django

unread,
Aug 15, 2025, 3:54:27 AMAug 15
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Antoliny):

* owner: (none) => Antoliny
* status: new => assigned

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

Django

unread,
Aug 16, 2025, 8:05:44 AMAug 16
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Antoliny):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/19735 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/36553#comment:3>

Django

unread,
Aug 19, 2025, 9:50:42 PMAug 19
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Antoliny):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1

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

Django

unread,
Aug 19, 2025, 11:04:15 PMAug 19
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Antoliny):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0

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

Django

unread,
Aug 26, 2025, 8:53:25 AMAug 26
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

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

Django

unread,
Aug 29, 2025, 9:13:59 PMAug 29
to django-...@googlegroups.com
#36553: Improve the semantic structure of admin widgets.
--------------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Antoliny):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36553#comment:7>
Reply all
Reply to author
Forward
0 new messages