This introduces more intentional tab navigation support in Blockly when using the keyboard navigation plugin, specifically by:
Ensuring the top-level container is only in the tab index once. Without these changes, Blockly's top div and top group are both in the root tab index (which means both are tabbed to when trying to use tab navigation which can be confusing to the user since there's no feedback that one of the tabs is going 'nowhere').
Introducing explicit 'enter' and 'escape' flows for giving Blockly keyboard focus (and taking away focus from the browser), otherwise the browser retains tab-based navigation.
See the following videos for demonstrations on the before/after behavior with these changes:
Note that there's still a "double tab navigation" issue for the main Blockly injection area with a screen reader (but not for normal navigation). This will require additional investigation outside this PR. The before/after behavior with the screen reader isn't included above since it's hard to see the results in the recording (the highlights and output of the reader aren't being captured).
Note also that this PR also includes a few cleanups:
Some syntax simplification when using lambdas.
Some constant renames/additions for consistency (and correctness in disposing of registered shortcuts).
Fixes #71
This introduces more intentional tab navigation support in Blockly when using the keyboard navigation plugin, specifically by:
See the following videos for demonstrations on the before/after behavior with these changes:
Before changes:
before_without_reader.webm
After changes:
after_without_reader.webm
Note that there's still a "double tab navigation" issue for the main Blockly injection area with a screen reader (but not for normal navigation). This will require additional investigation outside this PR. The before/after behavior with the screen reader isn't included above since it's hard to see the results in the recording (the highlights and output of the reader aren't being captured).
Note also that this PR also includes a few cleanups: