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

Implement focus indication for editors and panels #2352

Closed
alexdima opened this issue Jan 26, 2016 · 28 comments
Closed

Implement focus indication for editors and panels #2352

alexdima opened this issue Jan 26, 2016 · 28 comments
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues feature-request Request for new features or functionality ux User experience issues workbench-editors Managing of editor widgets in workbench window

Comments

@alexdima
Copy link
Member

Testing #2145

cc @stevencl @bgashler1

Here I am tabbing into the editor from the find widget. There is no visual indication that the editor just got the focus.

no-focus-code-editor

@bpasero Feel free to give to me if you think I should do something inside the editor or otherwise keep it if you think the workbench should highlight somehow the title area to indicate focus.

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues labels Jan 26, 2016
@bpasero bpasero modified the milestone: Jan 2016 Jan 26, 2016
@bpasero bpasero added the ux User experience issues label Jan 26, 2016
@bpasero
Copy link
Member

bpasero commented Jan 26, 2016

@chrisdias @stevencl fyi

@bpasero bpasero modified the milestones: Feb 2016, Jan 2016 Jan 26, 2016
@stevencl
Copy link
Member

Thanks. We should spend some time thinking about how best to indicate that an editor has focus. I don't know yet if it should involve the title area or the editor. @bpasero - did you have any specific ideas?

@bpasero
Copy link
Member

bpasero commented Jan 27, 2016

Not much, I guess the editor title area is a good start to add some indicator.

@bpasero bpasero removed the bug Issue identified by VS Code Team member as probable bug label Jan 28, 2016
@bpasero bpasero assigned stevencl and unassigned bpasero Jan 28, 2016
@bpasero
Copy link
Member

bpasero commented Jan 28, 2016

Very related to #2500

@bpasero
Copy link
Member

bpasero commented Jan 28, 2016

(needs UX thinking)

@bgashler1
Copy link
Contributor

Summary of our meeting today with @chrisdias, @isidorn, @stevencl, @bpasero and me.

We're going to need to look into exactly what the accessibility requirements are concerning focus on Tab vs focus on mouse.

Provided these requirements are permitting, we want to first try making focus outlines only for Tab (unless a user is in high-contrast mode). We are wanting to model how Office differentiates focusing with mouse vs keyboard navigation.

@bpasero suggested making focus on mouse always go to the body after click (so no outlines will appear, whereas tab will actually focus.

A similar solution I suggested is that we could listen for the Tab key and add a .tab-focus class to a top-level parent (e.g. body) which has rules to add focus indicators globally. This class is removed immediately on any user click, and will only return again when the Tab key is pressed again.

@bpasero
Copy link
Member

bpasero commented Feb 3, 2016

Actually what I saw happening e.g. in the boostrap theme when you click a link is that focus just moves to the body because the interaction is a real page transition, so it makes sense to move focus then.

@bpasero
Copy link
Member

bpasero commented Feb 5, 2016

@chrisdias @bgashler1 @stevencl I think the issue exists not just for code editors. Today you can open a markdown preview, an image or even a diff of 2 images in the editor part and we are not indicating any focus there. I think in the end we need an indication in the title area of the editor and cannot just rely on the control within the editor to provide focus feedback.

@chrisdias
Copy link
Member

👍

@joaomoreno joaomoreno modified the milestones: March 2016, Feb 2016 Feb 26, 2016
@joaomoreno joaomoreno assigned bpasero and unassigned stevencl Feb 26, 2016
@bpasero bpasero assigned bgashler1 and unassigned bpasero Mar 1, 2016
@bpasero
Copy link
Member

bpasero commented Mar 1, 2016

moving to @bgashler1 to decide if the high contrast theme is good enough for this to be done. I think we agreed that we want the strong indication for accessibility only in that theme:

image

@chrisdias
Copy link
Member

I was trying this today but with only one editor open and I found it difficult to know that I had even tabbed into the editor. This is a key piece of information. We have other focus highlights without the HC theme therefore I would think we need to fix this.

@bpasero
Copy link
Member

bpasero commented Mar 1, 2016

What about adding an extra rule that only applies to the editor if it has keyboard focus and only in HC theme?

@chrisdias
Copy link
Member

I'm not sure why we want to tie it to the HC theme. We show a nice, light focus indicator (in blue in the dark theme at least) everywhere else without the HC theme.

When i look at this I really have to study the screen to tell which editor has focus (I know which editor has focus :):

image

something subtle like this would be nice (picture B more than picture A):

image

@bgashler1
Copy link
Contributor

And here are the hc-black and light themes.
screen shot 2016-03-16 at 4 11 58 pm

screen shot 2016-03-16 at 4 11 11 pm

@bpasero bpasero assigned bpasero and unassigned alexdima Mar 17, 2016
@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

@bgashler1 thanks!

@chrisdias @stevencl @bgashler1 honestly I am not a big fan of adding a blue box around the editor with focus. i am also not sure if it helps a user or adds more confusion if you end up with something like this:

image

Given this is a sensitive change with impact, moving to post GA.

@bpasero bpasero modified the milestones: Backlog, March 2016 Mar 17, 2016
@chrisdias
Copy link
Member

Agreed, especially on the HC theme, i can't tell what has focus in the above picture. I would love to have something more subtle near the editor title where the name is.

@bgashler1
Copy link
Contributor

@bpasero: good call to delay (I don't want to break anything)

@bpasero and @chrisdias: I would love to discuss this with you all in a later UX sync. The reason I did it this way is because focus tends to show the entire bounds of what can be interacted with at the current tab position. Putting focus on the title/header of the editor may suggest that keyboard action will open the recent files palette to allow switching to a different file in that editor (after all, that's what clicking on the header does). I felt it was important for users to know that they are currently tabbed into the text-editable area of the editor (not any other part of the editor). This is also how this very editor is while I'm using it on GitHub. IMHO, If my focus were on the the header or anywhere out of bounds where I'm typing, I feel I'm interacting out of bounds or that there was a glitch.

I do agree that the high-contrast theme instance could be improved. The current line and the outline of the focused editor are indeed confusing, now that I'm looking at it again. I was trying to be consistent with focus colors on this, but I think this deserves an exception. If we continued with the editor outline approach, I think we should make the editor outline a different color and perhaps 1px instead of the current 2px size.

@bpasero bpasero changed the title No focus indication for code editors Implement focus indication for editors Apr 2, 2016
@bpasero bpasero added the feature-request Request for new features or functionality label Apr 2, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@bpasero bpasero added workbench workbench-editors Managing of editor widgets in workbench window and removed workbench labels Nov 11, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 17, 2017
@bpasero bpasero changed the title Implement focus indication for editors Implement focus indication for editors and panels Nov 17, 2017
@bpasero
Copy link
Member

bpasero commented Sep 18, 2018

I feel like this should be closed as we have run with this model for such a long time and adding anything to indicate focus seems like it could piss off people that liked our current model. @alexandrudima @stevencl @misolori thoughts?

If this is an accessibility issue, we can make a tweak maybe only for high contrast theme.

@miguelsolorio
Copy link
Contributor

Currently tabbing away from the Find widget navigates you to other areas (panels, activity bar, etc.), but tabbing backwards will take you back to the editor (and it has focus). This works as I'd expect it.

gif

@bpasero
Copy link
Member

bpasero commented Sep 18, 2018

@misolori I think the concern from Alex was that jumping into the editor does not give any real focus indication (other then maybe a blinking cursor)

@miguelsolorio
Copy link
Contributor

Ah, gotcha. I could maybe see us adding the focus outline on the the current line until the user starts typing. But I would still prefer how it currently works with the blinking cursor.

@bpasero
Copy link
Member

bpasero commented Sep 19, 2018

@misolori yeah me too

@alexdima
Copy link
Member Author

I don't feel passionate about this issue. It is fine for me to close it.

@bpasero
Copy link
Member

bpasero commented Sep 20, 2018

Ok think so too, thanks.

@bpasero bpasero closed this as completed Sep 20, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 2018
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 feature-request Request for new features or functionality ux User experience issues workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

7 participants