Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33725 closed Bug (fixed)

Admin sidebar’s filter field should not receive focus when sidebar is closed.

Reported by: Thibaud Colas Owned by: Sankalp
Component: contrib.admin Version: 4.0
Severity: Release blocker Keywords: accessibility, keyboard, tab stop
Cc: Tom Carrick, Maxim Milovanov Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Thibaud Colas)

In the Django admin, when I toggle the sidebar to have it closed, my keyboard focus going from the header to the page still disappears for one tab stop. This is tab stop 8 in the following screenshot:

https://code.djangoproject.com/raw-attachment/ticket/33725/nav-filter-tab-stops.png

Upon inspection, this seems to be the sidebar’s "Start typing to filter…" field. Since the field is hidden, it shouldn’t be possible to tab to it. The whole contents of the sidebar should be invisible and inert.

Attachments (1)

nav-filter-tab-stops.png (102.1 KB ) - added by Thibaud Colas 2 years ago.
Screenshot of the django admin in dark mode, with tab stops visualisation showing a stop on an invisible element

Download all attachments as: .zip

Change History (14)

by Thibaud Colas, 2 years ago

Attachment: nav-filter-tab-stops.png added

Screenshot of the django admin in dark mode, with tab stops visualisation showing a stop on an invisible element

comment:1 by Thibaud Colas, 2 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 2 years ago

Cc: Tom Carrick Maxim Milovanov added
Severity: NormalRelease blocker
Summary: Admin sidebar’s filter field should not receive focus when sidebar is closedAdmin sidebar’s filter field should not receive focus when sidebar is closed.
Triage Stage: UnreviewedAccepted
Version: dev4.0

Thanks for the report.

Regression in d915dd1c5809d7c2bb3679751cd5277571dcd9f7.

Follow up to 780473d75625d014cbe9b0acdea40b7a5970d5d8.

comment:3 by Mariusz Felisiak, 2 years ago

Easy pickings: set

comment:4 by Sankalp, 2 years ago

Owner: changed from nobody to Sankalp
Status: newassigned

comment:5 by Mariusz Felisiak, 2 years ago

Toggling tabIndex on <input id="nav-filter" ...> should do the trick here (see a similar solution for links in the sidebar, 780473d75625d014cbe9b0acdea40b7a5970d5d8.)

comment:7 by Sankalp, 2 years ago

Has patch: set

comment:8 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 90dcf27:

Fixed #33725 -- Made hidden quick filter in admin's navigation sidebar not focusable.

Regression in d915dd1c5809d7c2bb3679751cd5277571dcd9f7.

Follow up to 780473d75625d014cbe9b0acdea40b7a5970d5d8.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 170793f0:

[4.1.x] Fixed #33725 -- Made hidden quick filter in admin's navigation sidebar not focusable.

Regression in d915dd1c5809d7c2bb3679751cd5277571dcd9f7.

Follow up to 780473d75625d014cbe9b0acdea40b7a5970d5d8.

Backport of 90dcf271147693a8897f644c4c8943c5b73c02f8 from main

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In fe2e1478:

[4.0.x] Fixed #33725 -- Made hidden quick filter in admin's navigation sidebar not focusable.

Regression in d915dd1c5809d7c2bb3679751cd5277571dcd9f7.

Follow up to 780473d75625d014cbe9b0acdea40b7a5970d5d8.

Backport of 90dcf271147693a8897f644c4c8943c5b73c02f8 from main.

comment:12 by GitHub <noreply@…>, 2 years ago

In 1733c888:

Refs #33725 -- Replaced deprecated find_element_by_css_selector() with find_elements(By.CSS_SELECTOR, …).

Follow up to 90dcf271147693a8897f644c4c8943c5b73c02f8 and
2ccc0b22db6730ba0950b10bbc5238ae575e4a45.

comment:13 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 9fc56af0:

[4.1.x] Refs #33725 -- Replaced deprecated find_element_by_css_selector() with find_elements(By.CSS_SELECTOR, …).

Follow up to 90dcf271147693a8897f644c4c8943c5b73c02f8 and
2ccc0b22db6730ba0950b10bbc5238ae575e4a45.
Backport of 1733c888f4928e91889e4ae5baf6badbd073e08c from main

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