primereact
primereact copied to clipboard
Menu: Accessibility error reported in console on clicking any menu item
Describe the bug
There is a "aria-hidden" attribute on anchor tag within menu item and whenever we click on it, browser console reports that the attribute is blocked as focusable elements must not be hidden from assistive technology users.
Reproducer
https://stackblitz.com/edit/vitejs-vite-km4s9u
System Information
node: 20.11.0 react: 18.2.0 primereact: 10.8.2
MS Edge Chromium
Steps to reproduce the behavior
- Open Developer tools
- Click on "New" or "Settings" menu items on the rendered page
- Console reports "Blocked aria-hidden on a element because the element that just received focus must not be hidden from assistive technology users."
Expected behavior
No console errors related to accessibility
I will assign to PrimeTek as I am not sure why its aria-hidden but I can see that PrimeVue is the same way: https://primevue.org/menu/
I confirmed in PrimeVue aria-hidden is not there so removing it.