palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.51k stars 2.15k forks source link

Non-active PanelStack2 panels should not be able to have focus within, even if rendered #6871

Open evansjohnson opened 5 days ago

evansjohnson commented 5 days ago

Steps to reproduce

Actual behavior

Able to keyboard nav to non-visible items, user loses visual indication of what element is focused.

Expected behavior

Should not be able to focus and interact with non-visible panels.

Possible solution

Add focus relocating elements similar to what we do to trap focus in a Dialog to move focus from the first visible and focusable PanelStack2 item to the last focusable element before the PanelStack2