Skip to content

Commit

Permalink
#5639 MegaMenu | refactor for aria-haspopup
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Jan 4, 2024
1 parent 6e295eb commit 16aeb4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/megamenu/MegaMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ export const MegaMenu = React.memo(
id: key,
'aria-label': getItemLabel(processedItem),
'aria-disabled': isDisabled,
'aria-haspopup': isGroup || undefined,
'aria-haspopup': isGroup ? 'menu' : undefined,
'aria-level': '2',
'aria-expanded': isGroup ? isActive : undefined,
'aria-setsize': getAriaSetSize(),
Expand Down Expand Up @@ -1155,7 +1155,7 @@ export const MegaMenu = React.memo(
'aria-setsize': getAriaSetSize(),
'aria-posinset': getAriaPosInset(index),
'aria-expanded': isItemGroup(processedItem) ? isItemActive(processedItem) : undefined,
'aria-haspopup': isItemGroup(processedItem) || undefined,
'aria-haspopup': isItemGroup(processedItem) ? 'menu' : undefined,
'aria-disabled': isItemDisabled(processedItem),
'data-p-highlight': isItemActive(category),
'data-p-disabled': isDisabled,
Expand Down

0 comments on commit 16aeb4b

Please sign in to comment.