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

Make avatar menu focusable with keyboard #1854

Merged
merged 3 commits into from
May 12, 2021
Merged

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Apr 16, 2021

Fixes #613

This makes the avatar component focussable with the keyboard and also hitting the enter key will open the menu.
However the menu is not navigable and I'm not sure if we want to reimplement arrow navigation there.

  • multiple menus can be open with keyboard as enter doesn't re-close the other menus => solved
  • impossible to navigate menu entries with keyboard => tabs

Also, I heard that there will be a revamp of that popover, so the interaction in that popover would be different

@PVince81 PVince81 added the 2. developing Work in progress label Apr 16, 2021
@PVince81 PVince81 self-assigned this Apr 16, 2021
@PVince81 PVince81 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 16, 2021
@PVince81
Copy link
Contributor Author

I managed to make this work by automatically setting the focus on the first element inside the menu.
Then it's possible to tab to other menu items. Sadly also possible to leave the popover by tabbing out but there isn't much we can do about this, it's a general, separate issue.

So you can hit enter to open the trigger, then hit enter again on a menu link.

And when the popover is open, if you hit the Escape key, the popover closes and you're back on the trigger. That's near.

Minimal, but neat.

@PVince81 PVince81 added the enhancement New feature or request label Apr 16, 2021
@PVince81 PVince81 marked this pull request as ready for review April 16, 2021 09:12
@PVince81
Copy link
Contributor Author

Note: I've developed and tested this with the Talk app and with the participant list on the right of a conversation.

@PVince81 PVince81 added the accessibility Making sure we design for the widest range of people possible, including those who have disabilities label Apr 16, 2021
Copy link
Contributor

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 21, 2021
@PVince81
Copy link
Contributor Author

/backport to stable3

@PVince81 PVince81 force-pushed the enh/613/avatar-focussable branch from f2ef074 to 5009616 Compare May 12, 2021 08:48
@PVince81 PVince81 added this to the 4.0.0 milestone May 12, 2021
Signed-off-by: Vincent Petry <[email protected]>
@PVince81 PVince81 merged commit 5bdf4c5 into master May 12, 2021
@PVince81 PVince81 deleted the enh/613/avatar-focussable branch May 12, 2021 11:10
@backportbot-nextcloud
Copy link

The backport to stable3 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish accessibility Making sure we design for the widest range of people possible, including those who have disabilities backport-request enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avatar component not focusable with keyboard
4 participants