Skip to content

Commit

Permalink
Merge branch 'menu-disabled-focus-fix' of https://github.com/divyamma…
Browse files Browse the repository at this point in the history
…dhok/material-ui into menu-disabled-focus-fix
  • Loading branch information
ZeeshanTamboli committed Jul 28, 2023
2 parents 462896c + 7e519ec commit 9ece875
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/mui-material/src/MenuList/MenuList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,16 @@ describe('<MenuList />', () => {
expect(getAllByRole('menuitem')).to.have.length(2);
});

it('should not add tabIndex to presentation elements like Divider when all menuItems are disabled', () => {
it('should not add tabIndex to presentation elements like Divider when all Menu Items are disabled', () => {
const { getByRole } = render(
<MenuList>
<MenuItem disabled>one</MenuItem>
<MenuItem disabled>two</MenuItem>
<MenuItem disabled>three</MenuItem>
<Divider />
<MenuItem disabled>four</MenuItem>
<MenuItem disabled>two</MenuItem>
</MenuList>,
);

expect(getByRole('separator')).to.not.have.attribute('tabIndex');
expect(getByRole('separator')).not.to.have.attribute('tabIndex');
});
});

Expand Down

0 comments on commit 9ece875

Please sign in to comment.