-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Dropdowns should close on Esc press #11568
Comments
Media embed's panel closes. All other stay open. |
It never worked for headings if opened using mouse, I checked builds as old as v12.0.0. It only works when you're navigating using the keyboard because then the dropdown element (panel, items, whatever) is focused, and the heading's keystroke handler listens to events from the dropdown element.
Because there's an input in the panel that focuses as soon as you open the dropdown. Focused input == keystroke handler embedded in the media feature is able to listen to events from the media dropdown. To address this issue, we'd need to:
|
My thoughts too 👍 |
So this issue should be fixed by #11838 let's keep it open to make sure that indeed it works for all dropdowns as expected. |
Actually, the focus should probably move back to the element that triggered the dropdown (ARIA Practices recommends that). Moving back to editing would be really disturbing to the keyboard-only user, e.g. they opened some dropdown by accident and they're forced to refocus the toolbar and move through all buttons once more just to find the right dropdown. |
…fter-opening-dropdowns Fix (ui): Opening a dropdown should focus the first item (or the first active item) for easier navigation and accessibility. Closes #11838. Closes #2000. Closes #11568. Closes #3215. Closes #5859. MINOR BREAKING CHANGE (ui): Until now, `preventDefault()` was called on the `mousedown` event to prevent the [`ButtonView`](https://ckeditor.com/docs/ckeditor5/latest/api/module_ui_button_buttonview-ButtonView.html) from "stealing" the focus from the editing root. Starting from this editor version, to improve the accessibility of the editor, all instances of the [`ButtonView`](https://ckeditor.com/docs/ckeditor5/latest/api/module_ui_button_buttonview-ButtonView.html) class (and child classes) will automatically focus in DOM when clicked. It is recommended that features that use buttons to manage the content call `editor.editing.view.focus()` after the button was [executed](https://ckeditor.com/docs/ckeditor5/latest/api/module_ui_button_buttonview-ButtonView.html#event-execute) in order to bring the DOM focus back to the editing root to allow users type right away.
Scenario:
Expected: the dropdown is closed. The focus moved back to the editing.
Actual: nothing happened.
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: