Skip to content

Commit 12d526e

Browse files
committed
Remove tabpanel role when no tab items are rendered
1 parent e9d7cf8 commit 12d526e

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

packages-internal/core-docs/src/Demo/Demo.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ export function Demo(props: DemoProps) {
596596
console.error('Code content not copied', error);
597597
}
598598
};
599+
const willRenderTabList = demoData.relativeModules && openDemoSource && !editorCode.isPreview;
599600

600601
return (
601602
<Root>
@@ -667,7 +668,7 @@ export function Demo(props: DemoProps) {
667668
)}
668669
</DemoToolbarRoot>
669670
<Tabs.Root value={activeTab} onValueChange={handleTabChange}>
670-
{demoData.relativeModules && openDemoSource && !editorCode.isPreview ? (
671+
{willRenderTabList ? (
671672
<CodeTabList ownerState={ownerState}>
672673
{tabs.map((tab, index) => (
673674
<CodeTab
@@ -685,7 +686,12 @@ export function Demo(props: DemoProps) {
685686
{/* A limitation from https://github.com/nihgwu/react-runner,
686687
we can't inject the `window` of the iframe so we need a disableLiveEdit option. */}
687688
{tabs.map((tab, index) => (
688-
<Tabs.Panel value={index} key={index} tabIndex={-1}>
689+
<Tabs.Panel
690+
role={willRenderTabList ? 'tabpanel' : undefined}
691+
value={index}
692+
key={index}
693+
tabIndex={-1}
694+
>
689695
{demoOptions.disableLiveEdit || index > 0 ? (
690696
<DemoCodeViewer
691697
key={index}

packages/mui-envinfo/README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,31 @@ Please use this package if you report [issues to MUI](https://github.com/mui/mat
99
$ npx @mui/envinfo
1010

1111
System:
12-
OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
12+
OS: macOS 26.4.1
1313
Binaries:
14-
Node: 12.20.0 - ~/.nvm/versions/node/v12.20.0/bin/node
15-
Yarn: 1.22.4 - /usr/bin/yarn
16-
npm: 6.14.8 - ~/.nvm/versions/node/v12.20.0/bin/npm
14+
Node: 24.14.0 - /Users/brijesh/.nvm/versions/node/v24.14.0/bin/node
15+
npm: 11.9.0 - /Users/brijesh/.nvm/versions/node/v24.14.0/bin/npm
16+
pnpm: 10.33.0 - /Users/brijesh/.nvm/versions/node/v24.14.0/bin/pnpm
1717
Browsers:
18-
Chrome: 87.0.4280.66
19-
Firefox: 83.0
18+
Chrome: 147.0.7727.116
19+
Firefox: 148.0.2
20+
Safari: 26.4
2021
npmPackages:
21-
@emotion/react: ^11.0.0 => 11.1.1
22-
@emotion/styled: ^11.0.0 => 11.0.0
23-
@mui/codemod: 5.0.0-alpha.17
24-
@mui/material: 5.0.0-alpha.18
25-
@mui/internal-core-docs: 5.0.0-alpha.1
22+
@emotion/react: ^11.0.0 => 11.14.0
23+
@emotion/styled: ^11.0.0 => 11.14.1
24+
@mui/codemod: 9.0.0
25+
@mui/material: 9.0.0
26+
@mui/internal-core-docs: 9.0.1-canary.2
2627
@mui/envinfo: 2.0.0
27-
@mui/icons-material: 5.0.0-alpha.15
28-
@mui/lab: 5.0.0-alpha.18
29-
@mui/styled-engine: 5.0.0-alpha.18
30-
@mui/styled-engine-sc: 5.0.0-alpha.18
31-
@mui/styles: 5.0.0-alpha.18
32-
@mui/system: 5.0.0-alpha.18
33-
@mui/types: 5.1.0
34-
@mui/base: 5.0.0-alpha.18
35-
@mui/utils: 5.0.0-alpha.18
36-
@types/react: ^17.0.0 => 17.0.0
37-
react: ^16.14.0 => 16.14.0
38-
react-dom: ^16.14.0 => 16.14.0
39-
styled-components: 5.2.1
40-
typescript: ^4.0.2 => 4.0.5
28+
@mui/icons-material: 9.0.0
29+
@mui/styled-engine: 9.0.0
30+
@mui/styled-engine-sc: 9.0.0
31+
@mui/styles: 9.0.0
32+
@mui/system: 9.0.0
33+
@mui/types: 9.0.0
34+
@mui/utils: 9.0.0
35+
@types/react: ^19.0.0 => 19.2.14
36+
react: ^19 => 19.2.5
37+
react-dom: ^19 => 19.2.5
38+
typescript: ^5 => 5.9.3
4139
```

0 commit comments

Comments
 (0)