Accordion: Accessibility issues using keyboard navigation on accordion with form-elements inside (v16)
Describe the bug
When placing form elements such as input-number, cascade-select, and multi-select inside the Accordion panels, the keyboard controls (specifically the up and down arrow keys) do not function correctly.
After, i.e., selecting the CascadeSelect and expanding it using enter, I cannot press the down arrow key to get to the options. Instead, the first Accordion Panel gets selected.
Related to this: Focusable elements inside collapsed accordion panels are also highlighted if I navigate with the tab key. From my point of view, that makes no sense. At the moment, I developed a workaround to change tabIndex on content within hidden panels to 1, but this should be the default behavior I suppose.
So to sum it up:
- Arrow Key navigation of form elements within accordion panels doesn't work
- Tab-Navigation doesn't properly ignore collapsed content
Environment
Windows 10
Reproducer
Angular version
16.2.0
PrimeNG version
16.2.0
Build / Runtime
Angular CLI App
Language
ALL
Node version (for AoT issues node --version)
16.0.2
Browser(s)
No response
Steps to reproduce the behavior
- Open the provided StackBlitz demo.
- Use Tab-navigation to get to an accordion panel (there you can already notice that it also focuses elements in collapsed tabs)
- Open
MultiSelectorCascadeSelectusing spacebar / enter - Try to navigate into the actual options by using tab/arrow keys tab/arrow
Expected behavior
- Content of collapsed panels should be un-tabbable
- When using arrow keys/tab on form elements within one panel, it should behave as if the form element would be isolated (that is, default navigation as described in the documentation)
Source: primefaces/primeng