From 48344b421b752da20e7c31884295d3558804bafb Mon Sep 17 00:00:00 2001 From: KirankumarAmbati Date: Wed, 11 Jun 2025 13:52:42 +0530 Subject: [PATCH 1/6] [docs][material-ui][TextField] removed type="number" demos from TextField component docs --- .../text-fields/FormPropsTextFields.js | 32 ------------------- .../text-fields/FormPropsTextFields.tsx | 32 ------------------- .../components/text-fields/text-fields.md | 2 +- 3 files changed, 1 insertion(+), 65 deletions(-) diff --git a/docs/data/material/components/text-fields/FormPropsTextFields.js b/docs/data/material/components/text-fields/FormPropsTextFields.js index 810e9fb8ddf8db..f6501f00f90fcd 100644 --- a/docs/data/material/components/text-fields/FormPropsTextFields.js +++ b/docs/data/material/components/text-fields/FormPropsTextFields.js @@ -39,16 +39,6 @@ export default function FormPropsTextFields() { }, }} /> - - - - - - Date: Wed, 11 Jun 2025 15:13:39 +0530 Subject: [PATCH 2/6] Trigger CI From 23d8d9d51c98880987a5d6b94fe5b6a1ef7c110f Mon Sep 17 00:00:00 2001 From: KirankumarAmbati Date: Wed, 11 Jun 2025 21:54:41 +0530 Subject: [PATCH 3/6] [Switch] added role to Span element --- packages/mui-material/src/internal/SwitchBase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mui-material/src/internal/SwitchBase.js b/packages/mui-material/src/internal/SwitchBase.js index aed083b7e2a98c..14a067e017ae68 100644 --- a/packages/mui-material/src/internal/SwitchBase.js +++ b/packages/mui-material/src/internal/SwitchBase.js @@ -201,7 +201,7 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { centerRipple: true, focusRipple: !disableFocusRipple, disabled, - role: undefined, + role: 'switch', tabIndex: null, }, }); From 564c6858366210f9c018e61597c315dcff01502e Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Thu, 3 Jul 2025 14:37:11 +0530 Subject: [PATCH 4/6] Add role switch to input --- packages/mui-material/src/internal/SwitchBase.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mui-material/src/internal/SwitchBase.js b/packages/mui-material/src/internal/SwitchBase.js index 0053be252b42e2..4df4339fcafbb5 100644 --- a/packages/mui-material/src/internal/SwitchBase.js +++ b/packages/mui-material/src/internal/SwitchBase.js @@ -206,7 +206,7 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { centerRipple: true, focusRipple: !disableFocusRipple, disabled, - role: 'switch', + role: undefined, tabIndex: null, }, }); @@ -233,6 +233,7 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { name, readOnly, required, + role: 'switch', tabIndex, type, ...(type === 'checkbox' && value === undefined ? {} : { value }), From 9afa43b6329aa218eaab95840b16e5fe9d64ebeb Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Thu, 3 Jul 2025 18:15:23 +0530 Subject: [PATCH 5/6] remove disabled from switch root --- packages/mui-material/src/internal/SwitchBase.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/mui-material/src/internal/SwitchBase.js b/packages/mui-material/src/internal/SwitchBase.js index 4df4339fcafbb5..2fe67c518fed11 100644 --- a/packages/mui-material/src/internal/SwitchBase.js +++ b/packages/mui-material/src/internal/SwitchBase.js @@ -205,7 +205,6 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { additionalProps: { centerRipple: true, focusRipple: !disableFocusRipple, - disabled, role: undefined, tabIndex: null, }, @@ -233,7 +232,6 @@ const SwitchBase = React.forwardRef(function SwitchBase(props, ref) { name, readOnly, required, - role: 'switch', tabIndex, type, ...(type === 'checkbox' && value === undefined ? {} : { value }), From e14c58b67bbb6a933812e29dbc994593af97476b Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Thu, 3 Jul 2025 18:51:02 +0530 Subject: [PATCH 6/6] remove unnecessary assertion --- packages/mui-material/src/internal/SwitchBase.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/mui-material/src/internal/SwitchBase.test.js b/packages/mui-material/src/internal/SwitchBase.test.js index 303e49bac1b679..614ee5cf054c48 100644 --- a/packages/mui-material/src/internal/SwitchBase.test.js +++ b/packages/mui-material/src/internal/SwitchBase.test.js @@ -128,7 +128,6 @@ describe('', () => { ); // to.be.disabled - expect(container.firstChild).to.have.attribute('aria-disabled', 'true'); expect(container.firstChild).to.have.class(classes.disabled); });