Skip to content

Commit 9e892b4

Browse files
committed
Add back aria-haspopup="true"
1 parent b3f7042 commit 9e892b4

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

packages/react/src/ActionMenu/ActionMenu.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ const Overlay: FCWithSlotMarker<React.PropsWithChildren<MenuOverlayProps>> = ({
315315
focusZoneSettings={isNarrowFullscreen ? {disabled: true} : {focusOutBehavior: 'wrap'}}
316316
onPositionChange={onPositionChange}
317317
variant={variant}
318-
aria-haspopup="menu"
319318
>
320319
<div
321320
ref={containerRef}

packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ interface AnchoredOverlayBaseProps extends Pick<OverlayProps, 'height' | 'width'
117117
* Props to be spread on the close button in the overlay.
118118
*/
119119
closeButtonProps?: Partial<IconButtonProps>
120-
121-
/**
122-
* ARIA property indicating the availability and type of interactive popup element
123-
*/
124-
'aria-haspopup'?: boolean | 'dialog' | 'menu' | 'grid' | 'listbox' | 'tree' | 'true' | 'false'
125120
}
126121

127122
export type AnchoredOverlayProps = AnchoredOverlayBaseProps &
@@ -156,7 +151,6 @@ export const AnchoredOverlay: React.FC<React.PropsWithChildren<AnchoredOverlayPr
156151
align = 'start',
157152
alignmentOffset,
158153
anchorOffset,
159-
'aria-haspopup': _ariaHaspopup,
160154
className,
161155
pinPosition,
162156
variant = defaultVariant,
@@ -243,7 +237,7 @@ export const AnchoredOverlay: React.FC<React.PropsWithChildren<AnchoredOverlayPr
243237
renderAnchor({
244238
ref: anchorRef,
245239
id: anchorId,
246-
'aria-haspopup': _ariaHaspopup || 'true',
240+
'aria-haspopup': 'true',
247241
'aria-expanded': open,
248242
tabIndex: 0,
249243
onClick: onAnchorClick,

packages/react/src/Button/IconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const IconButton = forwardRef(
3434

3535
// If the button has an active "popup" (like a menu), we don't want to show the tooltip.
3636
// This is mostly for `ActionMenu`, but could be applicable elsewhere.
37-
const hasActivePopup = isExpanded && hasPopup === 'menu'
37+
const hasActivePopup = isExpanded && hasPopup === 'true'
3838

3939
const withoutTooltip =
4040
unsafeDisableTooltip ||

0 commit comments

Comments
 (0)