diff --git a/docs/src/pages/components/selects/MultipleSelect.js b/docs/src/pages/components/selects/MultipleSelect.js index 159dea2ecf1744..937352d6fdbf27 100644 --- a/docs/src/pages/components/selects/MultipleSelect.js +++ b/docs/src/pages/components/selects/MultipleSelect.js @@ -161,6 +161,7 @@ export default function MultipleSelect() { return selected.join(', '); }} MenuProps={MenuProps} + inputProps={{ 'aria-label': 'Without label' }} > Placeholder diff --git a/docs/src/pages/components/selects/MultipleSelect.tsx b/docs/src/pages/components/selects/MultipleSelect.tsx index 2434a0585835f9..866fa442a2ba29 100644 --- a/docs/src/pages/components/selects/MultipleSelect.tsx +++ b/docs/src/pages/components/selects/MultipleSelect.tsx @@ -163,6 +163,7 @@ export default function MultipleSelect() { return (selected as string[]).join(', '); }} MenuProps={MenuProps} + inputProps={{ 'aria-label': 'Without label' }} > Placeholder diff --git a/docs/src/pages/components/selects/SimpleSelect.js b/docs/src/pages/components/selects/SimpleSelect.js index 1fdd811009fe5f..d550a825b0dcf7 100644 --- a/docs/src/pages/components/selects/SimpleSelect.js +++ b/docs/src/pages/components/selects/SimpleSelect.js @@ -57,7 +57,13 @@ export default function SimpleSelect() { Some important helper text - None @@ -160,7 +166,13 @@ export default function SimpleSelect() { Auto width - Placeholder diff --git a/docs/src/pages/components/selects/SimpleSelect.tsx b/docs/src/pages/components/selects/SimpleSelect.tsx index a9bba3c40086fa..325bc73908f743 100644 --- a/docs/src/pages/components/selects/SimpleSelect.tsx +++ b/docs/src/pages/components/selects/SimpleSelect.tsx @@ -59,7 +59,13 @@ export default function SimpleSelect() { Some important helper text - None @@ -162,7 +168,13 @@ export default function SimpleSelect() { Auto width - Placeholder diff --git a/packages/material-ui/src/Select/Select.test.js b/packages/material-ui/src/Select/Select.test.js index afe1738494ff92..bd9986b9058761 100644 --- a/packages/material-ui/src/Select/Select.test.js +++ b/packages/material-ui/src/Select/Select.test.js @@ -409,7 +409,7 @@ describe('); // TODO what is the accessible name actually? - expect(getByRole('button')).to.have.attribute('aria-labelledby', ' '); + expect(getByRole('button')).to.not.have.attribute('aria-labelledby'); }); it('is labelled by itself when it has a name', () => { @@ -417,7 +417,7 @@ describe('