#34625 closed Bug (duplicate)

FilteredSelectMultiple widget’s elements aren’t labelled

Reported by: Thibaud Colas Owned by: nobody
Component: contrib.admin Version: 4.2
Severity: Normal Keywords: accessibility, screen reader
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Thibaud Colas)

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:

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#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.

Attachments (1)

permissions-multiple.gif (31.0 KB ) - added by Thibaud Colas 10 months ago.

Download all attachments as: .zip

Change History (5)

by Thibaud Colas, 10 months ago

Attachment: permissions-multiple.gif added

comment:1 by Thibaud Colas, 10 months ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 10 months ago

Triage Stage: UnreviewedAccepted

comment:3 by Thibaud Colas, 10 months ago

Description: modified (diff)

comment:4 by Thibaud Colas, 10 months ago

Resolution: duplicate
Status: newclosed

I see this was already reported in #34619 :) Closing

Note: See TracTickets for help on using tickets.
Back to Top