core icon indicating copy to clipboard operation
core copied to clipboard

Allow for keyboard navigation on NG dropdowns

Open wezell opened this issue 3 years ago • 2 comments

Like the site selector. The rule is Up/Down arrows go up and down tab goes to the next element enter selects

wezell avatar Aug 23 '22 19:08 wezell

PR: https://github.com/dotCMS/core/pull/23005/files

alfredo-dotcms avatar Sep 16 '22 22:09 alfredo-dotcms

Internal QA: Needs work

  1. When I tested the up/down arrows in the PP modal, it selected more than one user after hitting Enter. However, when I used the mouse, it just selected one

https://user-images.githubusercontent.com/8741395/192639894-bb03e44c-9847-4e61-ab3c-e0bbb05b8338.mov

  1. The keys don't work on these popups: A- Content Type creation (Workflow dropdown) Screen Shot 2022-09-27 at 4 38 10 PM

B- Content type edition (Icon dropdown)

https://user-images.githubusercontent.com/8741395/192652277-ba46419b-deea-410f-8e95-ce05aab5bda0.mov

  1. There is no way to select an option from a dropdown when you add/edit a content type because the ENTER performs the Create/Update actions and the popup is closed.

https://user-images.githubusercontent.com/8741395/192652869-cc01c7ad-8b2e-4d99-8a37-853f18d2cee9.mov

  1. I can't keep moving up/down when I try to create a rule

https://user-images.githubusercontent.com/8741395/192656799-6b956aa0-b4e5-47d6-915b-dd4f3f6ce5ab.mov

nollymar avatar Sep 27 '22 21:09 nollymar

Notes for new findings on https://github.com/dotCMS/core/issues/22835#issuecomment-1260078706

  1. that is a DOJO dropdown and is out of scope. A new bug was created for that https://github.com/dotCMS/core/issues/23070

image

2.A ) A style was added to show when the user focus on an option item in the dropdown. In this field a native PrimeNG component is being used, so the behavior is the same as it was designed by the authors (you can compare the behavior here). Note: if the behavior needs to meet others components, then a major refactor needs to be done, it will be out of scope and a new task will be required.

4 ) this won't be fixed on this task, the way that component was built in Rules is too attached and trying to fix it has lots of potentials to break rules. Explanation: every time an option is pick from the dropdown, the whole Rule Action components get re-rendered so you endup with new html components that makes you loose focus and can not continue navigating with the keyboard

alfredo-dotcms avatar Sep 29 '22 23:09 alfredo-dotcms

PR: https://github.com/dotCMS/core/pull/23079

alfredo-dotcms avatar Oct 03 '22 15:10 alfredo-dotcms

Internal QA: Passed

According to the comment left here, I tested cases 2.B and 3 which are working as expected.

nollymar avatar Oct 08 '22 00:10 nollymar

Approved QA - Tested on 22.11_4889b92f_SNAPSHOT // Docker // macOS 12.6 FF v106.0.3

Related to #23289

josemejias07 avatar Nov 02 '22 15:11 josemejias07