File tree Expand file tree Collapse file tree
packages/react/src/components/DataTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ const TableToolbarMenu = ({
3737 < OverflowMenu
3838 renderIcon = { renderIcon }
3939 className = { toolbarActionClasses }
40- title = { iconDescription }
4140 iconDescription = { iconDescription }
4241 menuOptionsClass = { menuOptionsClasses }
4342 flipped
Original file line number Diff line number Diff line change @@ -41,7 +41,21 @@ describe('TableToolbarMenu', () => {
4141 </ TableToolbarMenu >
4242 ) ;
4343
44- expect ( screen . getByText ( 'Icon description' ) ) . toBeInTheDocument ( ) ;
44+ expect (
45+ screen . getByRole ( 'button' , { name : 'Icon description' } )
46+ ) . not . toHaveAttribute ( 'title' ) ;
47+ } ) ;
48+
49+ it ( 'should not render a native title attribute' , ( ) => {
50+ render (
51+ < TableToolbarMenu >
52+ < span > test</ span >
53+ </ TableToolbarMenu >
54+ ) ;
55+
56+ expect (
57+ screen . getByRole ( 'button' , { name : 'Settings' } )
58+ ) . not . toHaveAttribute ( 'title' ) ;
4559 } ) ;
4660
4761 it ( 'should respect renderIcon prop' , ( ) => {
Original file line number Diff line number Diff line change @@ -585,7 +585,6 @@ exports[`DataTable behaves as expected selection should render and match snapsho
585585 aria-haspopup = " true"
586586 aria-labelledby = " tooltip-_r_2t_"
587587 class = " cds--toolbar-action cds--overflow-menu cds--overflow-menu cds--overflow-menu--md cds--btn cds--btn--md cds--layout--size-md cds--btn--ghost cds--btn--icon-only"
588- title = " Settings"
589588 type = " button"
590589 >
591590 <svg
@@ -1022,7 +1021,6 @@ exports[`DataTable renders as expected - Component API should render and match s
10221021 aria-haspopup = " true"
10231022 aria-labelledby = " tooltip-_r_m_"
10241023 class = " cds--toolbar-action cds--overflow-menu cds--overflow-menu cds--overflow-menu--md cds--btn cds--btn--md cds--layout--size-md cds--btn--ghost cds--btn--icon-only"
1025- title = " Settings"
10261024 type = " button"
10271025 >
10281026 <svg
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ exports[`TableToolbarMenu renders as expected - Component API should render 1`]
1616 aria-haspopup = " true"
1717 aria-labelledby = " tooltip-_r_1_"
1818 class = " custom-class cds--toolbar-action cds--overflow-menu cds--overflow-menu cds--overflow-menu--md cds--btn cds--btn--md cds--layout--size-md cds--btn--ghost cds--btn--icon-only"
19- title = " Add"
2019 type = " button"
2120 >
2221 <svg
You can’t perform that action at this time.
0 commit comments