From cd88789be7a7ee117f35fed56e6bff243816f54b Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 13 May 2022 14:38:12 -0500 Subject: [PATCH] toolbar: override aria-haspopup The Tooltip2 component incorrectly sets this attribute which should not be set for tooltips. --- src/toolbar/ActionButton.tsx | 2 ++ src/toolbar/OpenFileButton.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/toolbar/ActionButton.tsx b/src/toolbar/ActionButton.tsx index a4bfadb2..524dc8f4 100644 --- a/src/toolbar/ActionButton.tsx +++ b/src/toolbar/ActionButton.tsx @@ -96,6 +96,8 @@ const ActionButton: React.VoidFunctionComponent = ({ aria-label={label} elementRef={tooltipTargetRef as IRef} {...tooltipTargetProps} + // https://github.com/palantir/blueprint/pull/5300 + aria-haspopup={undefined} intent={Intent.PRIMARY} onClick={onAction} disabled={enabled === false} diff --git a/src/toolbar/OpenFileButton.tsx b/src/toolbar/OpenFileButton.tsx index ea35a146..20c283d3 100644 --- a/src/toolbar/OpenFileButton.tsx +++ b/src/toolbar/OpenFileButton.tsx @@ -111,6 +111,8 @@ const OpenFileButton: React.VoidFunctionComponent = ({ refKey: 'elementRef', elementRef: tooltipTargetRef as IRef, ...tooltipTargetProps, + // https://github.com/palantir/blueprint/pull/5300 + 'aria-haspopup': undefined, intent: Intent.PRIMARY, disabled: enabled === false, style: enabled === false ? pointerEventsNone : undefined,