Changes between Initial Version and Version 1 of Ticket #35940


Ignore:
Timestamp:
Nov 25, 2024, 6:04:04 PM (6 hours ago)
Author:
Thibaud Colas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35940 – Description

    initial v1  
    33See 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:
    44
     5[[Image(https://code.djangoproject.com/raw-attachment/ticket/35940/35940-select-filter.webp)]]
    56
    67For 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.
     
    89---
    910
    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:
     11The 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:
    1112
    1213- "Choose" (arrow right)
     
    1415- "Choose all"
    1516- "Remove all"
     17
     18Here 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]
Back to Top