-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Sidebar header: avoid focus loss and other improvements #8079
Comments
Forgot the part related to "and other improvements" 🙂
|
There is no corresponding PR, moving to 4.2. |
Hi @gziolo, do you know if there is any reason we can't pull My naive approach to indicating the active button would be to:
@afercia, do you have any thoughts on the general approach? I've seen posts about how |
Yes, we should consolidate those two sidebars into one Fill to avoid complete DOM update which causes focus lose. I can take care of this on Monday. I didn’t take that into account when refactored code to work almost like plugin sidebars like Yoast. I want to look into the whole implementation of Plugin sidebar and apply some changes in a way which would allow us to to have any number of tabs in the sidebar. I think that might be necessary when we work on phase 2. @youknowriad any thoughts on this? |
Can't we just wrap the sidebars with |
@brandonpayton hi and thanks for looking into this. I've considered to change these buttons in an ARIA tabbed interface. I'm not fully convinced it would really improve things though, as a tabbed interface adds some complexity to the keyboard interaction. I'd tend to think a tabbed interface adds value when there are many tabs. These are just two buttons and I'd rather keep things simple. Just my personal opinion 🙂 You're right there's no indication of which one of the twos is currently selected. What I'd probably do would be:
Re: |
Thanks, @gziolo! Please let me know if there's anything I can help with. I'll take a look at fixing the active button indication.
@youknowriad, I may misunderstand, but Thank you, @afercia. Simple is good. :) I'll work on your suggestion. Thanks for the link re: aria-controls. I'd skimmed it a bit before asking but need to read it in full. |
This should have been three issues if it prescribes three tasks. In implementing the focus loss solution in #10917, it's not clear whether it can "close" this one without tracking down several other pull requests in the process. For the future maintainer, this is my understanding of the status:
|
I think I disagree with this change because we're not tweaking the editor settings in this tab but the content settings. We may want to change the region name? Anyway I'm moving out of 4.2 for now. |
Yep whatever the button label is, ideally it should match the related navigable region name. The main reason why the navigable regions have a label prepended with "Editor" is to distinguish them from other existing landmarks in the page: I'd agree the wording can be improved, for example "top bar" is not appropriate. Not so simple though, as some of these regions have mixed content (e.g. Document settings and Block settings) or content that can change depending on settings (e.g. the Unified toolbar). There used to be a specific issue to keep track of labels improvements, see #2387 which is now closed. If there are no objections, I'd like to reopen #2387 and start listing the labels to improve there. |
When using a keyboard and activating one of the sidebar header buttons to switch sidebar, there's a focus loss:
The focus loss is more evident in some browsers (IE11) but it happens in all browsers and it's particularly annoying when using a screen reader. The only difference is that modern browsers are a bit smarter and they try to keep focus "in place" but it's very clear the button is not focused any longer after it gets pressed (the outline disappears).
Seems to me this has to do with the changes introduced in d4749ff
Previously (Gutenberg 2.6.0), the sidebar header was outside of the panels. Instead, now it's placed within the panels so it gets re-rendered every time users switch to the other sidebar. Compared with the previous behavior, this is actually an accessibility regression.
The text was updated successfully, but these errors were encountered: