Accessibility and Nesting Issues with TieredMenu
I'm submitting a ... (check one with "x")
[ X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) I've written a StackBlitz example to show different examples of the TieredMenu is action, compared to an accessible implementation (e.g. Angular Material) which we are currently going to have to use in the interim until the bug is resolved. Ideally, we would like to only use PrimeNG components as has been the case to date:
Accessibility Issues with TieredMenu (and others)
Current / Expected behavior Using the TieredMenuModel there are a number of accessibility issues making them unsuitable for blind users.
-
Issue 1 - If the TieredMenuModel is not nested, then the menu works closely to expected. Tabbing to the button and hitting enter will open the menu, tab will move you into the menu and arrow keys will move you around the menu. However, it appears that options can not be selected unless they are specifically a router or hyperlink. Command references seem to be ignored. Additionally, ESC does not close menus as might be expected.
-
Issue 2 - If the same model is nested into a primeng table, you have the option of either using 'appendTo' or not. If you do not use appendTo to link to body, then you will likely have layout issues as shown in the first table. If you do append to the body, then the ordering of tab to navigate to menu will be incorrect.
Minimal reproduction of the problem with instructions To reproduce the second issue above, use the StackBlitz linked above and view the two tables:
- Table 1 - With appendTo unused the tabbing order works as expected. Both the Angular material menu and the PrimeNG menus work relatively as expected (Issue 1 outstanding for PrimeNG)
- Table 2 - With appendTo body enabled, the table looks more correct. However, the tab order is incorrect. After selecting the menu, subsequent tabs will cycle all other components on the table before cycling to the menu.
What is the motivation / use case for changing the behavior? We have multiple blind users using our systems and this is a critical issue for us, as we intended to use Menu options in our tables. This renders the interfaces unusable for the visually impaired. I have provided the Material implementation for reference only to demonstrate working functionality.
Please tell us about your environment: Ubuntu, IntelliJ, latest Angular, PrimeNG etc.
-
Angular version: 12.2.0
-
PrimeNG version:12.0.1
-
Browser: All tested including Chrome and Firefox
-
Language: all
We planned full accessibility support for the next versions of PrimeNG. Thank you for your report. PrimeNG will be fully accessible soon.