-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix image link preset suggestions arrow key navigation #58615
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.7 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this. This PR appears to fix the issue 👍
As for why the NavigableMenu
component was replaced with a MenuGroup
, that was actually done in this commit by @richtabor, who may be able to offer additional insight.
Idea was to closer align with LinkControl, for the future migration to using LinkControl exclusively here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Aside from the keyboard navigation aspect, MenuGroup
(role="group"
) is also not a sufficient wrapper for MenuItem
(role="menuitem"
) in this context, because it still needs an enclosing menu
. (NavigableMenu
is role="menu"
.) Maybe that could've been more clear in the docs.
Thanks all for fixing this.
Yes, that would be appreciated but I'm not sure it would solve the underlying problem. I'd greatly appreciate a discussion on how to prevent such breakages. To me, it looks like:
It's not my intent to blame anyone. We all make mistakes, I make many. However, I see a recurring trend in many pull requests where there's a total lack of keyboard testing and that's less than ideal. I will create a GitHub discussion, any constructive feedback is very welcome. |
What?
Fixes: #58495
When adding a link to an image, the initial view of the UI shows some preset suggestions:
In this PR the
NavigableMenu
component was replaced with aMenuGroup
, which broke the arrow key navigation. I don't see any reason for that change, but @artemiomorales would be good to confirm or explain why is needed and take action accordingly.Step-by-step reproduction instructions