Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ResizableFrame: Make keyboard accessible #52443
ResizableFrame: Make keyboard accessible #52443
Changes from 5 commits
39ecfff
8973571
50cb20f
70cee45
74fccc8
8a3e0ff
641c682
d73d15e
5ccb4b9
96f95c6
f5b7a8f
5fa0e8d
f5bbecd
5acbbfd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Needs accessibility feedback: Do we want some kind of focus manipulation after the frame is resized to full width? (cc @afercia @andrewhayward)
To test
Comment out line 197 to see the default behavior.
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.
I think it would be good if focus behaved the same in this case as it does when moving to edit mode by pressing Enter after focusing the frame, where we land at the top of the editing canvas and Tab focuses the first block in Select mode.
One thing I'm noticing is that focusing on resize handle and pressing left arrow once sometimes takes me into edit mode straightaway. I'm not sure if that's desirable, as currently the drag handle, when dragged with a mouse, allows us to expand the canvas until the sidebar is about 100px wide, and only if we try expanding further than that does it switch to edit mode. Dragging with a mouse is also behaving a bit weirdly in this branch:
draghandle.mov
(I can't reproduce this 100% of the time, but it's happening consistently on Firefox and about half the time on Chrome)
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.
Hello @mirka @tellthemachines I'd agree focus management should work in the same way it works when switching to the Edit view when pressing Enter on the iframe. However, I'm not sure it should land on the first block... I created #51570 a few days ago to reconsider initial focus on the Site editor > Edit view.
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.
Makes
is-resizing
a proper CSS modifier for this element, instead of relying on the modifier on the parent element.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.
Resets user agent
button
styles.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.
Unused styles 🧹