Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action bar: escape losses focus #91085

Closed
isidorn opened this issue Feb 20, 2020 · 17 comments
Closed

Action bar: escape losses focus #91085

isidorn opened this issue Feb 20, 2020 · 17 comments
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Feb 20, 2020

Keyboard focus on an action in the actionBar. Press esc the focus is lost. You have to press tab or shit-tab to get focus back on a visible element.
Idealy pressing esc in the action bar would pass the focus to the parent of the actionBar.
Similar how pressing esc while in the tree focuses the tree element.

fyi @bpasero @jvesouza

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues labels Feb 20, 2020
@isidorn isidorn added this to the March 2020 milestone Feb 20, 2020
@isidorn isidorn self-assigned this Feb 20, 2020
@bpasero
Copy link
Member

bpasero commented Feb 20, 2020

Yes, seems ok to me if currently ESC literally does blur()

@isidorn
Copy link
Contributor Author

isidorn commented Mar 4, 2020

@jvesouza I now tried out what other apps are doing and it seems like most of them (Outlook, Word) do not change focus when pressing Esc when navigating over actions.
So I am leaning towards making that change, that esc woudl actually have no effect in that case.
@bpasero might you know why we initialy set esc to clear action bar focus
@jvesouza why were you actually pressing esc in the first place? What would you like to achieve? Or you were just surprised that the focus disapeared?

@bpasero
Copy link
Member

bpasero commented Mar 4, 2020

I cannot recall why we do that. And in fact, if I tab around here in the GitHub UI and press ESC, nothing happens either. For me this only makes sense if we were to focus something else in the UI, but just doing blur without focusing something else is probably wrong.

@jvesouza
Copy link

jvesouza commented Mar 4, 2020

@isidorn I press the esc key because I haven't found an appropriate action. Another point is that I could activate the actions menu by mistake.

@ajborka
Copy link

ajborka commented Mar 10, 2020

Confirmed in 1.44 build. True that pressing ESC should result in no action when in toolbars and trees.

@isidorn
Copy link
Contributor Author

isidorn commented Mar 11, 2020

@ajborka why do you say no action? Wouldn't i tmake more sense that esc moves focus to the outer container?

@ajborka
Copy link

ajborka commented Mar 11, 2020

@isidorn,
Screen readers usually implement their own functionality for these types of situations. For example, JAWS uses forms mode to interact with edit controls, listboxes, trees, and so on. NVDA uses a forms mode similar to JAWS, but it uses NVDA+SPACE to activate/deactivate forms mode. Orca uses a feature similar to forms mode, but it is called focus mode. You can toggle it on and off with ORCA+A when in web content such as vscode, Firefox, or Chrome. Leaving this functionality to the screen reader will avoid vscode overriding screen reader features.

@isidorn
Copy link
Contributor Author

isidorn commented Mar 12, 2020

@ajborka thanks for the feedback. So let's do just that. esc will have no action, just like Outlook and other apps do. We will get feedback on our insiders channel and we might potentially change it.

So the actionBar now on Esc fires onDidCancel and clients can listen to it and move focus as they please for special cases. The general case is that focus will not change.
fyi @sbatten since custom menus are a special case, however they already listen so no code changes needed.

@ajborka
Copy link

ajborka commented Mar 13, 2020

@isidorn This is fixed from today's build.

@isidorn
Copy link
Contributor Author

isidorn commented Mar 13, 2020

Thanks adding verified label. Now let's see and wait for potential user feedback.

@isidorn isidorn added the verified Verification succeeded label Mar 13, 2020
@jvesouza
Copy link

I am not sure if the problem has really been fixed, or else I have the wrong understanding of the problem.

Steps to reproduce:

  1. Press ctrl+shift+e.
  2. Use arrows and chose a folder.
  3. Press the application key.
  4. Use arrows.
  5. Press escape key.

On my machine the focus seems to return to the file explorer as expected, but I can't use the arrows to navigate the list of files.
I need to press the tab key and then shift + tab to restore normal operation.
Am I using the wrong version?

Version: 1.44.0-insider
Commit: efd7548
Date: 2020-03-13T06:06:14.299Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.5.8-arch1-1

@ajborka
Copy link

ajborka commented Mar 13, 2020

@jvesouza I am not having the problem you have. Everything works as expected in terms of pressing ESC on the context menu, then navigating the files list.

@jvesouza
Copy link

@ajborka @isidorn I'm sorry for insisting on this, but would it be possible to perform the following steps to check if the result is the same as what I'm getting?

  1. Press ctrl+shift+e.
  2. Using the arrows choose any file/folder in the file list.
  3. Press the shift + f10 key and immediately press the escape key.
  4. Try to choose another file / folder from the file list using the arrows.

In my environment all works ok.

  1. Press the shift + f10 key, but do not press the escape key.
  2. Press down arrow two or thre times.
  3. Press the escape key.
  4. After pressing the escape key try to choose another file using the arrows.

In my environment the orca is muted and I need to press tab and shift + tab to get everything back to normal.

@isidorn
Copy link
Contributor Author

isidorn commented Mar 16, 2020

@jvesouza this works just fine for me, I followed your steps exactly.

Please note that we have two menu implementations, on Linux the default one is the native linux menus. Maybe try changing this to use our custom menus with this setting

"window.titleBarStyle": "custom"

Also note that your scenario correctly works for me both with custom and native menus.

@ajborka
Copy link

ajborka commented Mar 16, 2020

@isidorn this works as expected. No matter what I do in the menu, returning to the files list still lets me arrow to a file and open it. @jvesouza do you have last night's build?

@jvesouza
Copy link

@ajborka Yes, I've last nightly.
@isidorn I can't explain why, but when I include the parameter "window.titleBarStyle": "custom" in my configuration " file everything started to work as expected.

@isidorn
Copy link
Contributor Author

isidorn commented Mar 16, 2020

@jvesouza for some reason the native linux menus do not play well with your Orca. I would try to reproduce in other apps with native menus.
As a workaround for now you can use custom vscode menus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants