Opened 6 months ago

Closed 6 months ago

Last modified 6 months 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 6 months 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)

Changed 6 months ago by Thibaud Colas

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 Changed 6 months ago by Thibaud Colas

Description: modified (diff)

comment:2 Changed 6 months ago by Mariusz Felisiak

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 Changed 6 months ago by Mariusz Felisiak

Easy pickings: set

comment:4 Changed 6 months ago by Sankalp

Owner: changed from nobody to Sankalp
Status: newassigned

comment:5 Changed 6 months ago by Mariusz Felisiak

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

comment:7 Changed 6 months ago by Sankalp

Has patch: set

comment:8 Changed 6 months ago by Mariusz Felisiak

Triage Stage: AcceptedReady for checkin

comment:9 Changed 6 months ago by Mariusz Felisiak <felisiak.mariusz@…>

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 Changed 6 months ago by Mariusz Felisiak <felisiak.mariusz@…>

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 Changed 6 months ago by Mariusz Felisiak <felisiak.mariusz@…>

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 Changed 6 months ago by GitHub <noreply@…>

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 Changed 6 months ago by Mariusz Felisiak <felisiak.mariusz@…>

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