codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
27.77k stars 2.04k forks source link

Navigation through the page is impossible with keyboard only #2434

Open archatas opened 11 months ago

archatas commented 11 months ago

Normally the TAB key is used to navigate from field to field on the page. However, when Editor.js is installed, pressing the TAB opens dropdowns for all instances of Editor.js on the page and the focus is locked on the dropdown without a possibility to escape it and move to the other fields on the page.

Steps to reproduce:

  1. Create a simple page with at least one text input and a few Editor.js widgets:
<input type="text" />
<div id="editorjs1"></div>
<div id="editorjs2"></div>
<input type="text" />
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
<script>
const editor1 = new EditorJS('editorjs1');
const editor2 = new EditorJS('editorjs2');
</script>
  1. Press TAB
  2. This opens dropdowns to select a block elements for all Editor.js widgets.

Expected behavior: Focusing the first focusable element on the page: the text input field. Then by pressing on the TAB or Shift+TAB repeatedly, one should be able to navigate through the form elements or links on the page including the Editor.js widgets.

Screenshots: image

Device, Browser, OS: Chrome, MacOS

Editor.js version: 2.27.2

Plugins you use with their versions: The default ones

iraklisg commented 11 months ago

I do confirm that. Also happening on Linux (Chrome and Firefox)