There are two problems here:
- "Filter edit text" – it’s not ideal for both of those to have the same
label. Ideally each side would have a separate label ("Filter Available
permissions", "Filter Chosen permissions"). This could be achieved with
adding an `aria-describedby` on the filter `input` elements, pointing to
the "Available permissions" text (and same for chosen permissions).
- "list box" – those `select` elements don’t have a label at all. This
needs to be added by transforming the `h2` elements into `label`, with a
`for` pointing at each field.
In both cases it seems the fix should be implemented in [SelectFilter2.js
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38].
In Django itself, only `contrib.auth` group and user model forms use the
`filter_horizontal` ModelAdmin API which has the issue. Not quite sure
whether this widget is meant to be reused by users or not.
--
Ticket URL: <https://code.djangoproject.com/ticket/34625>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "permissions-multiple.gif" added.
Old description:
> In the admin UI, the `FilteredSelectMultiple` is missing labels for some
> of its elements. Here’s a recording of the widget’s UI, and what users
> would get for it in VoiceOver:
>
> There are two problems here:
>
> - "Filter edit text" – it’s not ideal for both of those to have the same
> label. Ideally each side would have a separate label ("Filter Available
> permissions", "Filter Chosen permissions"). This could be achieved with
> adding an `aria-describedby` on the filter `input` elements, pointing to
> the "Available permissions" text (and same for chosen permissions).
> - "list box" – those `select` elements don’t have a label at all. This
> needs to be added by transforming the `h2` elements into `label`, with a
> `for` pointing at each field.
>
> In both cases it seems the fix should be implemented in [SelectFilter2.js
> https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38].
>
> In Django itself, only `contrib.auth` group and user model forms use the
> `filter_horizontal` ModelAdmin API which has the issue. Not quite sure
> whether this widget is meant to be reused by users or not.
New description:
In the admin UI, the `FilteredSelectMultiple` is missing labels for some
of its elements. Here’s a recording of the widget’s UI, and what users
would get for it in VoiceOver:
[[Image(https://code.djangoproject.com/raw-attachment/ticket/34625
/permissions-multiple.gif)]]
There are two problems here:
- "Filter edit text" – it’s not ideal for both of those to have the same
label. Ideally each side would have a separate label ("Filter Available
permissions", "Filter Chosen permissions"). This could be achieved with
adding an `aria-describedby` on the filter `input` elements, pointing to
the "Available permissions" text (and same for chosen permissions).
- "list box" – those `select` elements don’t have a label at all. This
needs to be added by transforming the `h2` elements into `label`, with a
`for` pointing at each field.
In both cases it seems the fix should be implemented in [SelectFilter2.js
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38].
In Django itself, only `contrib.auth` group and user model forms use the
`filter_horizontal` ModelAdmin API which has the issue. Not quite sure
whether this widget is meant to be reused by users or not.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34625#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34625#comment:2>
Old description:
> In the admin UI, the `FilteredSelectMultiple` is missing labels for some
> of its elements. Here’s a recording of the widget’s UI, and what users
> would get for it in VoiceOver:
>
New description:
[[Image(https://code.djangoproject.com/raw-attachment/ticket/34625
/permissions-multiple.gif)]]
[https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/SelectFilter2.js#L38
SelectFilter2.js#L38].
In Django itself, only `contrib.auth` group and user model forms use the
`filter_horizontal` ModelAdmin API which has the issue. Not quite sure
whether this widget is meant to be reused by users or not.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34625#comment:3>
* status: new => closed
* resolution: => duplicate
Comment:
I see this was already reported in #34619 :) Closing
--
Ticket URL: <https://code.djangoproject.com/ticket/34625#comment:4>