Desktop: Accessibility: Improve keyboard navigation in the Markdown and note toolbar #10819
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request improves focus handling in the Markdown editor's toolbar and the toplevel note toolbar. This pull request does not affect the Rich Text editor's toolbar.
At a more detailed level, this pull request:
role
and relatedaria
information with the Markdown editor and note toolbars.packages/app-desktop/gui/ToolbarBase.tsx
to simplify the implementation of (3).ToolbarButton.tsx
:ToolbarButton
's use of StyledComponents to SCSS.<a>
to<button>
. This allows space to activate toolbar buttons and removes the need for anhref="#"
.See also:
Note:
Remaining issues
It's difficult to navigate to the Markdown editor toolbar
Currently, Joplin overrides Tab-key navigation from the title input. This makes it difficult to navigate to the note toolbar using the keyboard. This may violate WCAG SC 1.3.4 and might, but seems less likely to, violate WCAG SC 2.1.1.
Fixing this may require change in what Tab does when the title input is focused (for example, using Enter and/or ArrowDown to navigate to the editor and not overriding Tab). I plan to address this in a future pull request.
Note
Currently, it's possible to move focus to the Markdown editor toolbar by:
Tooltips aren't shown when focusing toolbar items with the keyboard
If VoiceOver is disabled and the user doesn't have access to a mouse, it doesn't seem to be possible to show the tooltip for a toolbar button.
Testing
This pull request includes an automated test that verifies:
Additional manual testing (MacOS):
****
is added to the markdown editor and the cursor is between the first**
and second**
s.