Allow for keyboard navigation on NG dropdowns
Like the site selector. The rule is Up/Down arrows go up and down tab goes to the next element enter selects
PR: https://github.com/dotCMS/core/pull/23005/files
Internal QA: Needs work
- 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
- The keys don't work on these popups:
A- Content Type creation (Workflow dropdown)
B- Content type edition (Icon dropdown)
https://user-images.githubusercontent.com/8741395/192652277-ba46419b-deea-410f-8e95-ce05aab5bda0.mov
- 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
- 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
Notes for new findings on https://github.com/dotCMS/core/issues/22835#issuecomment-1260078706
- that is a DOJO dropdown and is out of scope. A new bug was created for that https://github.com/dotCMS/core/issues/23070

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
PR: https://github.com/dotCMS/core/pull/23079
Internal QA: Passed
According to the comment left here, I tested cases 2.B and 3 which are working as expected.
Approved QA - Tested on 22.11_4889b92f_SNAPSHOT // Docker // macOS 12.6 FF v106.0.3
Related to #23289