-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API to switch focus from sidePanel
to main document to enable accessibility features
#693
Comments
In contrast, when the side panel is opening, the focus remains on main webpage and does not move to the side panel, which makes some functions impossible. For example, a typical user requirement is to focus on the input box when the side panel opens, so that the user can input something immediately. So I hope there is a way to solve the problem of bidirectional focus movement. |
We discussed this during an in-person triage meeting at TPAC. We are aligned on the following:
|
sidePanel
to main document to enable accessibility features
A typical case comes to mind. When opening a new tab page(by shortcut or mouse), the focus is on the address bar for user input. Now the new tab page extension would like to call tabs.focus() to move the focus into the NTP for its own searching or shortcut function. Do browsers allow this behavior? There may be other risks of abuse. |
I raised that exact question and the answer is that the content area would be focused indeed. The meeting notes for the TPAC 2024 meeting will be published soon, here is the relevant excerpt:
|
Any movement on this? |
+1, this is blocking one of our launches. |
Here is an example, hoping that the focus will remain in A common use of However, currently after calling If I want to use the keyboard up and down keys in the I'm sure there are plenty of other situations there that would like to keep the focus in the So we need a method to prevent the
I support the extension having that ability. The If this is the user expects to replace the default address bar focus, an extra click will disrupt the user workflow. Preventing abuse is something extensions should provide relevant options for. |
I'm having this exact same issue and yes it would be optimal to change the default so that the sidepanel gets into focus upon trigger or at an option to focus the sidepanel when opening it. There's only two workarounds I'm aware of, on Windows/Linux you can press Below is also a link pertinent to this dialogue |
Description:
Interacting with the extension’s side panel (
chrome.sidePanel
) shifts focus away from the main webpage, and there is no way to programmatically return focus to the main document. This limitation makes it impossible to implement some features related to accessibility.Context:
Managing focus between the main document and the side panel's document within the same tab is essential for accessibility.
With proper focus management, the user can select something from the side panel, and the side panel can simulate certain events that only work when the main document is in focus.
Currently, extensions can switch focus between tabs, but not within the main document and side panel document.
Proposed Solution:
Introduce a new API that allows extensions to programmatically shift focus from the side panel back to the main document.
The text was updated successfully, but these errors were encountered: