From e738a2af577ba9d5d054cd87bb13e1af2ee88e8d Mon Sep 17 00:00:00 2001
From: KitoC <35714838+KitoC@users.noreply.github.com>
Date: Fri, 9 Aug 2024 09:48:45 +1000
Subject: [PATCH] TPP 849 final touches (#317)
* removed disabled and addd aria-hidden and remove tabbability, added testid for menu
* 3.2.23
---
lib/components/ActionsMenu/index.js | 22 +++++++++++++++-------
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/lib/components/ActionsMenu/index.js b/lib/components/ActionsMenu/index.js
index 20e2fe32..aed39287 100644
--- a/lib/components/ActionsMenu/index.js
+++ b/lib/components/ActionsMenu/index.js
@@ -188,12 +188,11 @@ export const ActionsMenuItem = styled((props) => {
const { as, ...others } = props;
const Component = as ? as : others.href ? "a" : "button";
- const disabled = !actionMenu?.context?.open ?? false;
+ const disabled = props.disabled;
let newProps = {
...others,
- ...(actionMenu?.getItemProps?.() || {}),
- disabled
+ ...(actionMenu?.getItemProps?.() || {})
};
const { onClick: originalOnClick } = newProps;
@@ -210,12 +209,20 @@ export const ActionsMenuItem = styled((props) => {
newProps = {
...others,
type: "button",
- ["data-action-menu-id"]: id,
- disabled
+ ["data-action-menu-id"]: id
};
}
- return