I have a small modal-like pane that appear when a user clicks on or keyboard navigates to special filter input. This pane is full of buttons that indicate how the filter should properly act. While the user can currently keyboard navigate around the pane, if they tab past the close button of the pane, they are sent back to the top of the html document because the pane is rendered at the very button of the page. (See pane below)
How should the pane act on keyboard navigation? I initial though that the focus should be put back to the first item of the pane, but this would cause keyboard users to get permanently stuck in the pane. I also thought about closing the pane, but feel this would be unexpected by the user because they didn't hit the enter or space key to click the button.