Skip to content

Commit

Permalink
Fix(web-react): Add missing presentation role to TabItem #DS-1653
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Jan 23, 2025
1 parent f25d377 commit 66a901b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web-react/src/components/Tabs/TabItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const TabItem = ({ children, forTabPane, onClick, ...restProps }: TabItemProps):
};

return (
<li className={classProps.item}>
<li className={classProps.item} role="presentation">
<button
{...transferProps}
{...styleProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ describe('TabItem', () => {

restPropsTest((props) => <TabItem forTabPane={0} {...props} />, 'button');

it('should render list item', () => {
render(<TabItem forTabPane={0} />);

const element = screen.getByRole('presentation');

expect(element).toHaveClass('Tabs__item');
});

it('should render button tag when there is no href prop', () => {
render(<TabItem forTabPane={0} />);

Expand Down

0 comments on commit 66a901b

Please sign in to comment.