[Django] #34619: Ensures select element has an accessible name

5 views
Skip to first unread message

Django

unread,
Jun 1, 2023, 11:35:59 AM6/1/23
to django-...@googlegroups.com
#34619: Ensures select element has an accessible name
-----------------------------------------+-------------------------------
Reporter: Cheuk Ting Ho | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 4.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 |
-----------------------------------------+-------------------------------
The following snippet:

```
<select name="permissions_old" id="id_permissions_from" multiple=""
class="filtered" data-field-name="permissions" data-is-stacked="0">
```

in `admin/auth/group/add/` is lacking the accessible name for the
selected. We suspect is the JS widget modified the label generated.

The problematic select elements:

-
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L16
-
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L113

And where their labels need to be created:

-
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38
-
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L83

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

Django

unread,
Jun 1, 2023, 11:36:16 AM6/1/23
to django-...@googlegroups.com
#34619: Ensures select element has an accessible name
-------------------------------+--------------------------------------

Reporter: Cheuk Ting Ho | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:

Keywords: accessibility | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Cheuk Ting Ho:

Old description:

> The following snippet:
>
> ```
> <select name="permissions_old" id="id_permissions_from" multiple=""
> class="filtered" data-field-name="permissions" data-is-stacked="0">
> ```
>
> in `admin/auth/group/add/` is lacking the accessible name for the
> selected. We suspect is the JS widget modified the label generated.
>
> The problematic select elements:
>
> -
> https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L16
> -
> https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L113
>
> And where their labels need to be created:
>
> -
> https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38
> -
> https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L83

New description:

The following snippet:

`
<select name="permissions_old" id="id_permissions_from" multiple=""
class="filtered" data-field-name="permissions" data-is-stacked="0">
`

in `admin/auth/group/add/` is lacking the accessible name for the
selected. We suspect is the JS widget modified the label generated.

The problematic select elements:

And where their labels need to be created:

--

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

Django

unread,
Jun 2, 2023, 3:15:10 AM6/2/23
to django-...@googlegroups.com
#34619: Ensures select element has an accessible name
-------------------------------+------------------------------------
Reporter: Cheuk Ting Ho | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 4.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 Mariusz Felisiak):

* stage: Unreviewed => Accepted


Old description:

New description:

The following snippet:

The problematic select elements:

--

Comment:

> in `admin/auth/group/add/` is lacking the accessible name for the
selected. We suspect is the JS widget modified the label generated.

Are we talking about `aria-label`? Sorry, I'm not an expert in this area.

Tentatively accepted as I believe you discussed this with Thibaud.

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

Reply all
Reply to author
Forward
0 new messages