-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Problem
It has become more clear through user testing that we need to track whether or not the user is actively "using" keyboard navigation. For users who exclusively use the mouse, showing the keyboard navigation cursor is likely to be confusing and distracting. For users who exclusively use the keyboard, not showing the cursor is confusing as they will lose track of where their actions will take place.
Until now, we've been acting as if using the keyboard to initiate an action means you're using keyboard navigation, and we show the cursor after that action.
However, consider the user who primarily uses the mouse, but uses the "delete" key to delete a block. They've never previously interacted with keyboard navigation, and now all of a sudden they have a flashing cursor on their workspace that they don't know what to do with.
What we don't want is to have the user have to activate a "keyboard navigation mode." Keyboard nav should always work but be invisible if it's not being used.
Request
See if we can come up with a heuristic to determine the user is using keyboard navigation -- not just that they've used a keyboard shortcut like delete or copy/paste. I think some keyboard actions like using tab to navigate between the page and blockly, using t to open the toolbox, using the arrow keys to navigate the workspace, are all "keyboard navigation" behaviors while delete, enter to commit a field change, cut/copy/paste are all "keyboard shortcut" behaviors
Open questions:
- Can we determine that you've focused Blockly via tab vs via clicking?
- We have at least an idea of things you could do that mean you want to start using keyboard navigation. How would we know if they are no longer using it? e.g. they accidentally pressed the up arrow and now they can see a cursor. Does using the mouse immediately take them out of keyboard nav mode?
- What is the full list of behaviors that mean you're using keyboard navigation?
- What if we get it wrong? Is there a way the user can manually opt in to see a cursor?
If we had such a heuristic, we could query some method that tracks it when we're doing a "keyboard shortcut" behavior and use it to determine whether or not to show the cursor.
Alternatives considered
Another way of framing this is is the idea of "only show the cursor after an action if it was already visible." That would be a great heuristic for things like pressing the delete key. But how do you ever get a cursor to show up in the first place then? You would need some list of actions that always show the cursor... like using t to open the toolbox, using the arrow keys to navigate the workspace, etc. You end up still needing a list of actions that ultimately signify that the user is using keyboard navigation, so this framing has all the same open questions as above.
Instead of a method to track if we're using keyboard navigation, we could instead have all actions update the location of the cursor (e.g. when a block is deleted, move the cursor to the workspace or to the previous connection or whatever) but not toggle the visibility of the cursor (e.g. deleting a block does not change the visibility). Instead, keyboard-navigation-specific actions would always trigger the cursor to visible, and mouse actions would trigger it to not be visible (assuming the cursor appearance is distinct from the block selection). This is probably simpler, if the cursor visibility is indeed distinct from the idea of a block being selected.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status