[Django] #35795: Admin forms: "Delete" button should be a button

28 views
Skip to first unread message

Django

unread,
Sep 26, 2024, 1:15:37 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena | Owner: Alena Volkova
Volkova |
Type: Bug | Status: assigned
Component: | Version: 5.0
contrib.admin |
Severity: Normal | Keywords: Accessibility, WCAG
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 1 |
-------------------------------------+-------------------------------------
Current: link tags. Semantically incorrect.

"In HTML, links and buttons are different elements, which serve different
purposes:

Links take the user to a new location, such as a new web page or new
section of the current page.
Buttons trigger some action, such as showing content on the page that was
previously hidden, playing a video, or submitting a form.

This distinction matters because it affects user expectations. If a screen
reader announces an element as a “link” or “button,” users have
expectations about what will happen when they click that element. If
something else happens, this can be disorienting."

https://www.washington.edu/accesstech/websites/links-buttons/
--
Ticket URL: <https://code.djangoproject.com/ticket/35795>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 26, 2024, 1:30:02 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" added.

Django

unread,
Sep 26, 2024, 1:31:17 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" removed.

Django

unread,
Sep 26, 2024, 1:31:17 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" added.

Django

unread,
Sep 26, 2024, 1:31:48 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.2.png" added.

Django

unread,
Sep 26, 2024, 1:33:21 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" removed.

Django

unread,
Sep 26, 2024, 1:33:36 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.2.png" removed.

Django

unread,
Sep 26, 2024, 1:33:49 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" added.

Django

unread,
Sep 26, 2024, 1:34:36 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" removed.

Django

unread,
Sep 26, 2024, 1:34:52 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" added.

Django

unread,
Sep 26, 2024, 1:35:39 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.14.png" added.

Django

unread,
Sep 26, 2024, 1:35:45 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* Attachment "Screenshot 2024-09-26 at 13.28.13.png" removed.

Django

unread,
Sep 26, 2024, 2:58:58 PM9/26/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
| Volkova
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

Comment:

Thank you Alena, I think adding role="button" should work
--
Ticket URL: <https://code.djangoproject.com/ticket/35795#comment:1>

Django

unread,
Sep 27, 2024, 10:09:28 AM9/27/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Alena
Type: | Volkova
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Alena Volkova):

* type: Bug => Cleanup/optimization
* version: 5.0 => dev

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

Django

unread,
Oct 5, 2024, 5:39:49 AM10/5/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jay Patel):

* owner: Alena Volkova => Jay Patel

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

Django

unread,
Oct 5, 2024, 5:40:15 AM10/5/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jay Patel):

* has_patch: 0 => 1

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

Django

unread,
Oct 5, 2024, 5:44:27 AM10/5/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jay Patel):

* stage: Accepted => Ready for checkin

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

Django

unread,
Oct 5, 2024, 7:53:20 AM10/5/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Ready for checkin => Accepted

Comment:

Please don't mark your own patch as ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/35795#comment:6>

Django

unread,
Oct 5, 2024, 10:27:43 AM10/5/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Jay Patel):

Oh my bad, new contributor here. Replying to [comment:6 Simon Charette]:
> Please don't mark your own patch as ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/35795#comment:7>

Django

unread,
Oct 8, 2024, 6:26:08 AM10/8/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

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

Django

unread,
Oct 15, 2024, 11:56:05 AM10/15/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jay Patel):

* needs_better_patch: 1 => 0

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

Django

unread,
Oct 15, 2024, 9:49:09 PM10/15/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

Comment:

I've reviewed the PR. Except for the two entries in
`django/contrib/admin/templates/admin/actions.html` (which currently have
a `href="#"`), all the other (currently modified) links are truly a link:

* Delete link in `django/contrib/admin/templates/admin/submit_line.html`
takes the user to a confirmation page
* Reset password link in
`django/contrib/auth/templates/auth/widgets/read_only_password_hash.html`
takes the user to a reset password page

I'm don't think we should be changing the links for Delete and Reset
Password to have `role="button"` since they do not submit any form nor
perform any action on their own. They truly take the user to another page.
--
Ticket URL: <https://code.djangoproject.com/ticket/35795#comment:10>

Django

unread,
Oct 16, 2024, 5:21:19 AM10/16/24
to django-...@googlegroups.com
#35795: Admin forms: "Delete" button should be a button
-------------------------------------+-------------------------------------
Reporter: Alena Volkova | Owner: Jay Patel
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Accessibility, WCAG | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jay Patel):

* needs_better_patch: 1 => 0

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