Inconsistent keyboard navigation between adjacent blocks
📝 Reproduction steps
- pnpm run manual
- open http://localhost:8125/packages/ckeditor5-image/manual/imageinsert.manual.html or https://ckeditor.com/ckeditor-5/demo/productivity/?channelId=4f44d739-2d49-41b0-967c-de92274187de#demo like in a video
- imageinsert is only for example, you can reproduce bug anywhere as shown in the video
✔️ Expected result
Keyboard navigation should be consistent across logical blocks: arrow keys should be used to navigate within a block, while Tab and Shift + Tab should move between blocks.
❌ Actual result
Keyboard navigation behaves inconsistently between adjacent blocks. In most blocks, the arrow keys are used to navigate between items in a list, while in only one block, Tab and Shift + Tab are used for the same purpose. This makes navigation unintuitive when moving between adjacent blocks.
https://github.com/user-attachments/assets/baaa12af-3e6c-4bfc-9f03-f0147a2caead
❓ Possible solution
One possible solution could be to adjust the actions in the relevant FocusCycler and update the corresponding tests. I tried this locally, and the resulting behavior seems more consistent.
I'd appreciate your thoughts on this. If you agree that this behavior could be improved, I'd be happy to open a PR with a proposed solution.
Thanks for the detailed report and the video!
You're right. Keyboard navigation should be consistent across the UI, with arrow keys moving within a block and Tab / Shift+Tab moving between blocks. Places that break this pattern are worth aligning. Your proposed solution sounds good, so feel free to open a PR. We'll take a closer look during the review.
Thanks for offering to work on this!
Hi! I've opened PR #20263 with the proposed fix. The changes are ready for review. Please let me know if anything needs to be adjusted. Thanks!
Thanks! Your changes have been included in c0b5fce. The only adjustment is that Tab navigation stays when the dropdown contains a non-button view. We appreciate your contribution!