#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.
--
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070198ab9fe7db-f5c05416-501f-42fd-94f7-2edf6bcb40c1-000000%40eu-central-1.amazonses.com.