PanelMenu: aria-expanded
attribute missing when PanelMenu items are collapsed
#6430
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When using the
PanelMenu
component and passing the:expandedKeys
prop to control the expanded state of menu items, I noticed an inconsistency with thearia-expanded
attribute for the header elements.The div element with
data-pc-section="header"
includes thearia-expanded
attribute when the menu item is expanded, and its value is set to"true"
. However, when the item is collapsed, thearia-expanded
attribute is removed entirely, instead of being updated to"false"
.Reproducer
https://primevue.org/panelmenu/#controlled
PrimeVue version
4.x
Vue version
3.x
Language
ALL
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
:expanded-keys
passed as a prop https://primevue.org/panelmenu/#controlleddata-pc-section="header"
witharia-label="Users"
, this is the first item from the panel menu example.aria-expanded="true"
is added in the element attributes.aria-expanded
disappears. Thedata-p-active
is also removed here, it stays on some of the examples so I think it should stay as well, having the value "false" when the item is collapsed.Expected behavior
aria-expanded
attribute should remain on theheader
element, regardless of whether the item is expanded or collapsed.aria-expanded
should be"true"
anddata-p-active
should also be"true"
.aria-expanded
should be"false"
anddata-p-active
should also be"false"
.The text was updated successfully, but these errors were encountered: