Skip to content

Make hover actions keyboard accessible - #95712

Merged
Pine (octref) merged 2 commits into
masterfrom
tyriar/keyboard_hover_actions
Apr 21, 2020
Merged

Pine (octref) merged 2 commits into
masterfrom
tyriar/keyboard_hover_actions

Conversation

@Tyriar

Copy link
Copy Markdown
Contributor

Fixes #95702

This lets you focus the actions via tab and they are correctly marked as role=button

image

@Tyriar

Copy link
Copy Markdown
Contributor Author

This doesn't actually work yet, need to hook up the activation handler.

This commit hides the hover before the code actions menu is shown, if
we don't do this the order that the editor's mouseleave event fires is
different and it ends up closing both. This happens only when activating
via the enter key.
@Tyriar

Copy link
Copy Markdown
Contributor Author

Pine (@octref) ready for review

@Tyriar
Daniel Imms (Tyriar) force-pushed the tyriar/keyboard_hover_actions branch from 51682c4 to 0fe16a0 Compare April 20, 2020 18:00
@octref
Pine (octref) merged commit f011b31 into master Apr 21, 2020
@octref
Pine (octref) deleted the tyriar/keyboard_hover_actions branch April 21, 2020 20:53
@octref

Copy link
Copy Markdown
Contributor

LGTM, do you want to add it to release note? Preferably also adding that you need to click hover widget to tab into it.
If you are using keyboard, running "Show Hover" command, I don't think it's tabbable.

@Tyriar

Copy link
Copy Markdown
Contributor Author

If you are using keyboard, running "Show Hover" command, I don't think it's tabbable.

It is if you're in screen reader mode. Isidor Nikolic (@isidorn) do you think we should change that behave such that show hover always focuses the hover?

@isidorn

Copy link
Copy Markdown

Daniel Imms (@Tyriar) we already do that, if screen reader mode is on show hover focuses the hover
Code pointer

const focus = editor.getOption(EditorOption.accessibilitySupport) === AccessibilitySupport.Enabled;

@Tyriar

Copy link
Copy Markdown
Contributor Author

Isidor Nikolic (@isidorn) right now they're not keyboard accessible (via the hover) unless you're in accessibility mode. The question is whether it should focus it regardless of accessibility mode if you trigger the hover via the command?

@isidorn

Copy link
Copy Markdown

Daniel Imms (@Tyriar) not sure.
When I designed the debug hover I actually designed to behave like you say: when invoked via keybinding pass focus.
So it might make sense for the eidtor action as well. Though it might be a breaking change, so if you decide to change it do it asap so we get feedback on insiders before stable release.

@Tyriar

Copy link
Copy Markdown
Contributor Author

I guess let's keep it as is for now since it would break the case where you're typing and want to view the hover, plus the actions are available via commands/other keybindings.

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions in hover are not keyboard accessible

3 participants