Changes between Initial Version and Version 1 of Ticket #35940
- Timestamp:
- Nov 25, 2024, 6:04:04 PM (6 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35940 – Description
initial v1 3 3 See a [https://thibaudcolas.github.io/django_admin_tests/latest/english/admin/auth/user/1/change/#fieldset-0-2-heading demo page with this widget]. The problem can be reproduced by tabbing to the buttons. This shouldn’t be possible when they are in their "disabled" state: 4 4 5 [[Image(https://code.djangoproject.com/raw-attachment/ticket/35940/35940-select-filter.webp)]] 5 6 6 7 For keyboard users this means two unexpected / unnecessary tab stops when moving through the form. For screen reader users, the buttons will behave as if they were functional even though nothing happens when pressing them. … … 8 9 --- 9 10 10 The best solution here will be to switch to semantic `<button type="button">` elements, and their `disabled` attributes. This needs to be done for the four "add/remove" buttons:11 The best solution here will be to use the `<button>` elements’ `disabled` attribute instead of the CSS `active` class. This needs to be done for the four "add/remove" buttons: 11 12 12 13 - "Choose" (arrow right) … … 14 15 - "Choose all" 15 16 - "Remove all" 17 18 Here is the relevant code: [https://github.com/django/django/blob/857b1048d53ebf5fc5581c110e85c212b81ca83a/django/contrib/admin/static/admin/js/SelectFilter2.js#L248-L258 SelectedFilter2.js: SelectedFilter.refresh_icons]