We're working on making Joplin more accessible. Part of this involves improving keyboard navigation. Currently, the way Joplin handles Tab has accessibility issues.
This post's goal is to collect feedback and suggestions: How should Joplin support keyboard navigation in an accessible way?
The issue
Currently, some functionality is difficult or impossible to access when navigating with tab and shift-tab.
1. Changing focus from the title to the body with tab
Currently, pressing Tab from the title input moves the cursor to the note body:
This skips the focusable items in the note toolbar and can make it difficult to use certain features with only a keyboard.
Related WCAG guidelines
The WCAG:
2. Moving focus out of the editor requires pressing Esc before Tab/Shift-Tab
At present, Tab indents in the Rich Text and Markdown editors and Shift-Tab de-indents. This turns these editors into focus traps.
It's currently possible to leave the focus trap by pressing Escape before Tab/Shift-Tab (or using one of the "jump focus to" shortcuts). However, this isn't well documented.
Note: The behavior described above is different in Joplin <= 3.0.
Note: This issue on the W3C ARIA-practices GitHub repo suggests using ctrl-m as a "toggle tab mode" keyboard shortcut.
Related WCAG guidelines
Proposed changes
1. Use different keyboard shortcuts to navigate between the editor and the title
Update: This suggestion has been included in Joplin v3.1.4.
Rather than remapping tab, it could make sense to use enter and the arrow keys to navigate between the title and the body.
In particular:
- Pressing Enter when the title input is focused focuses the editor.
- Pressing Down when the cursor is at the end of the title input navigates to the first line of the editor:
- Pressing Up when the cursor is at the beginning of the editor navigates to the title.
This would allow the Tab to follow the default focus order:
This would fix the first issue raised above, but would not fix the second.
See also: A possible implementation.
2. Include a "tab navigation" toggle button
This solution involves adding a ctrl-m "toggle tab indentation" shortcut and providing a toggle button to document this shortcut. (ctrl-m seems to be the standard shortcut for this).
For example,
This button would only be visible when it has focus. However, if the user is navigating with Tab, this button would be visible before the editor receives focus.
By providing instructions on how to escape the focus trap, this button should satisfy this section of the WCAG 2.2:
If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away.
โ WCAG ยง2.1.2, emphasis added.
Feedback?
- This post proposes replacing a Tab key mapping with other shortcuts (arrow keys, enter). Should these shortcuts be adjusted?
- What should be done to show users how to escape the note editor focus trap? Is the "tab indentation" button suggested above sufficient?