primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.98k stars 1.06k forks source link

Menu: Accessibility error reported in console on clicking any menu item #7045

Open mujahidislam opened 3 months ago

mujahidislam commented 3 months ago

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

  1. Open Developer tools
  2. Click on "New" or "Settings" menu items on the rendered page
  3. 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

melloware commented 3 months ago

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/