Skip to content
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

Nav sidebar: improve focus management on toggle of sidebar #39801

Open
getdave opened this issue Mar 28, 2022 · 10 comments
Open

Nav sidebar: improve focus management on toggle of sidebar #39801

getdave opened this issue Mar 28, 2022 · 10 comments
Assignees
Labels
[Feature] Navigation in Site View Navigation section in the Site Editor when in Site View, offering a way to manage Navigation Menus a [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@getdave
Copy link
Contributor

getdave commented Mar 28, 2022

I'd expect focus to be transferred to the sidebar when that button is clicked, as well as from the "Navigation Menus" button in the header

See #39290.

As suggested there let's improve the focus management to transfer to/from the sidebar.

@getdave getdave added [Type] Bug An existing feature does not function as intended [Feature] Navigation in Site View Navigation section in the Site Editor when in Site View, offering a way to manage Navigation Menus a labels Mar 28, 2022
@getdave getdave self-assigned this Mar 28, 2022
@getdave
Copy link
Contributor Author

getdave commented Mar 28, 2022

Ok I had a look at this. This is a problem for all the secondary sidebars because it isn't handled in the @wordpress/interface package. I believe the reason for this is that it's very difficult to have a one-size-fits-all for choosing which element to focus.

I'll keep working on this.

@alexstine
Copy link
Contributor

@getdave How does it work currently for block settings sidebar? E.g. using Tab key out of a block will focus block settings sidebar.

@getdave
Copy link
Contributor Author

getdave commented Mar 30, 2022

It's using some hooks to handle going to new focus and back to old one. The complexity in this case is that this sidebar makes use of ComplementaryArea from @wordpress/interface which is deeply nested and uses a lot of Slot/Fill. This makes auto managing focus quite complex.

@alexstine
Copy link
Contributor

@getdave Probably need to use something more flexible. I've faced issues with that myself in another PR.

@tellthemachines tellthemachines added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Apr 1, 2022
@tellthemachines tellthemachines moved this from Triage to Todo in WordPress 6.0 Editor Tasks Apr 1, 2022
@getdave getdave changed the title Improve focus management on toggle of sidebar Nav sidebar: improve focus management on toggle of sidebar Apr 5, 2022
@alexstine
Copy link
Contributor

@getdave Can I help in any way? We've got to land this one before this goes out in 6.0. Labeling issues we can live with, focus management is a must.

@getdave
Copy link
Contributor Author

getdave commented Apr 5, 2022

@getdave Can I help in any way? We've got to land this one before this goes out in 6.0. Labeling issues we can live with, focus management is a must.

@alexstine I'm painfully aware of this. I've been reaching out looking for additional support as I've been swamped with tasks. I'll circle back to this tomorrow to see if I can find a simple fix with a view to providing something more comprehensive in a future release.

@scruffian
Copy link
Contributor

Given that this doesn't happen for the other sidebars, is it a blocker for 6.0?

@alexstine
Copy link
Contributor

@scruffian

Given that this doesn't happen for the other sidebars, is it a blocker for 6.0?

Absolutely. There is no way this should have happened for other sidebars.

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

Hi,
This issue has gone 180 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the Needs Testing Needs further testing to be confirmed. label Oct 3, 2022
@getdave
Copy link
Contributor Author

getdave commented Oct 4, 2022

This is still valid. Note the sidebar is still experimental so it won't end up in WP 6.1.

@ndiego ndiego removed the Needs Testing Needs further testing to be confirmed. label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Navigation in Site View Navigation section in the Site Editor when in Site View, offering a way to manage Navigation Menus a [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants