From 4d1bb85af5019ab1141aa1a1d22f4b036acbce26 Mon Sep 17 00:00:00 2001
From: Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Date: Mon, 6 Jan 2025 16:22:08 -0800
Subject: [PATCH 1/2] [docs] Remove more instances of Adobe XD (#44956)
---
docs/src/components/home/DesignKits.tsx | 9 +++------
docs/src/modules/components/AdobeXDIcon.js | 16 ----------------
packages/mui-docs/src/svgIcons/AdobeXDIcon.tsx | 16 ----------------
3 files changed, 3 insertions(+), 38 deletions(-)
delete mode 100644 docs/src/modules/components/AdobeXDIcon.js
delete mode 100644 packages/mui-docs/src/svgIcons/AdobeXDIcon.tsx
diff --git a/docs/src/components/home/DesignKits.tsx b/docs/src/components/home/DesignKits.tsx
index 348ffb54fc1fef..7c9e8994316c25 100644
--- a/docs/src/components/home/DesignKits.tsx
+++ b/docs/src/components/home/DesignKits.tsx
@@ -66,7 +66,7 @@ const Anchor = styled('a')(({ theme }) => [
const DesignToolLink = React.forwardRef<
HTMLAnchorElement,
- React.PropsWithChildren<{ brand: 'figma' | 'sketch' | 'adobexd' }>
+ React.PropsWithChildren<{ brand: 'figma' | 'sketch' }>
>(function DesignToolLink(props, ref) {
const { brand, ...other } = props;
return (
@@ -79,8 +79,6 @@ const DesignToolLink = React.forwardRef<
'https://mui.com/store/items/figma-react/?utm_source=marketing&utm_medium=referral&utm_campaign=home-products',
sketch:
'https://mui.com/store/items/sketch-react/?utm_source=marketing&utm_medium=referral&utm_campaign=home-products',
- adobexd:
- 'https://mui.com/store/items/adobe-xd-react/?utm_source=marketing&utm_medium=referral&utm_campaign=home-products',
}[brand]
}
target="_blank"
@@ -91,7 +89,7 @@ const DesignToolLink = React.forwardRef<
const DesignToolLogo = React.forwardRef<
HTMLImageElement,
- { brand: 'figma' | 'sketch' | 'adobexd' } & AvatarProps
+ { brand: 'figma' | 'sketch' } & AvatarProps
>(function DesignToolLogo({ brand, ...props }, ref) {
return (
;
}
@@ -229,7 +227,6 @@ export function DesignKitTools({ disableLink, ...props }: { disableLink?: boolea
>
{renderTool('figma')}
{renderTool('sketch')}
- {renderTool('adobexd')}
);
}
diff --git a/docs/src/modules/components/AdobeXDIcon.js b/docs/src/modules/components/AdobeXDIcon.js
deleted file mode 100644
index ca3634838b2ee9..00000000000000
--- a/docs/src/modules/components/AdobeXDIcon.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import * as React from 'react';
-import { createSvgIcon } from '@mui/material/utils';
-
-export default createSvgIcon(
-
-
-
- ,
- 'AdobeXD',
-);
diff --git a/packages/mui-docs/src/svgIcons/AdobeXDIcon.tsx b/packages/mui-docs/src/svgIcons/AdobeXDIcon.tsx
deleted file mode 100644
index ca3634838b2ee9..00000000000000
--- a/packages/mui-docs/src/svgIcons/AdobeXDIcon.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import * as React from 'react';
-import { createSvgIcon } from '@mui/material/utils';
-
-export default createSvgIcon(
-
-
-
- ,
- 'AdobeXD',
-);
From 0221d17856a63d89e832d49f652b1e189ab7b7cf Mon Sep 17 00:00:00 2001
From: siddhantantil39 <54893999+siddhantantil39@users.noreply.github.com>
Date: Tue, 7 Jan 2025 13:04:58 +0530
Subject: [PATCH 2/2] [material-ui][Select] Do not set `aria-controls` when
closed (#44919)
Signed-off-by: siddhantantil39 <54893999+siddhantantil39@users.noreply.github.com>
Co-authored-by: Albert Yu
---
packages/mui-material/src/Select/Select.test.js | 5 +++++
packages/mui-material/src/Select/SelectInput.js | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/mui-material/src/Select/Select.test.js b/packages/mui-material/src/Select/Select.test.js
index 3dc42c37d9473c..100b69b1ca4a9f 100644
--- a/packages/mui-material/src/Select/Select.test.js
+++ b/packages/mui-material/src/Select/Select.test.js
@@ -517,6 +517,11 @@ describe('', () => {
expect(getByRole('combobox', { hidden: true })).to.have.attribute('aria-controls', listboxId);
});
+ it('does not set aria-controls when closed', () => {
+ const { getByRole } = render();
+ expect(getByRole('combobox', { hidden: true })).to.not.have.attribute('aria-controls');
+ });
+
specify('the listbox is focusable', async () => {
const { getByRole } = render();
diff --git a/packages/mui-material/src/Select/SelectInput.js b/packages/mui-material/src/Select/SelectInput.js
index fd48bd5d44b08d..a1acee8485330f 100644
--- a/packages/mui-material/src/Select/SelectInput.js
+++ b/packages/mui-material/src/Select/SelectInput.js
@@ -497,7 +497,7 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {
ref={handleDisplayRef}
tabIndex={tabIndex}
role="combobox"
- aria-controls={listboxId}
+ aria-controls={open ? listboxId : undefined}
aria-disabled={disabled ? 'true' : undefined}
aria-expanded={open ? 'true' : 'false'}
aria-haspopup="listbox"