Make inline image toolbar focussable by keyboard#14001
Make inline image toolbar focussable by keyboard#14001
Conversation
afercia
left a comment
There was a problem hiding this comment.
Thanks so much for working on this. After some testing I'm not sure I'm fully convinced the interaction is ideal though. Especially selection and initial focus. Will comment on the related issue for general discussion.
In the meantime, I've noticed a few issues:
1
When the inline image is in a new line (Shift+Enter) and then moving the caret across the image with the arrow keys, the block crashes (at least in Chrome): Cannot read property top of undefined
2
pressing Escape should close the inline toolbar and move focus back to the previous insertion point/selected image
Testing with Safari and VoiceOver:
3
the image is announced as selected even when it's not "visually" selected and the caret is still before the image. I guess this is because of the TinyMCE boundaries?
4
Can't reproduce consistently but trying to select the image and change its size multiple times can produce a duplicated image:
These issues will be fixed by #33401.
Agreed. It should select the image at least. |
See also #14026 |
|
Looks like this needs to be rebased with |
|
Needs to be rethought and refreshed, so closing. |



Description
Attempts to fix #10595. I added a keyboard shortcut to focus the contextual toolbar, currently only for inline images, but ideally, it should work the same for any contextual toolbar such as the one for links and ones added by plugins e.g. color. Also tells the user when on image gets selected and deselected, with the shortcut to focus the contextual toolbar.
Not expecting to be perfect from the start. Once it looks good I'll add an e2e test for it to avoid regressions.
N.B. There are boundaries around the image, which is a bug that will get fixed by #13948.
How has this been tested?
In a rich text field, add an inline image. Select it. You should get a spoken message that the image has been selected and which shortcut to use to access the contextual toolbar. Try it. The popover content wrapper should receive focus. You can now tab to the form elements. Edit the width and apply. Selection should go back to the rich text field. Deselect the image and there should be a spoken message again.
Screenshots
Types of changes
Checklist: