diff --git a/e2e/components/DataTable/DataTable-test.avt.e2e.js b/e2e/components/DataTable/DataTable-test.avt.e2e.js index 7259c55644d2..3756fdaf860e 100644 --- a/e2e/components/DataTable/DataTable-test.avt.e2e.js +++ b/e2e/components/DataTable/DataTable-test.avt.e2e.js @@ -154,8 +154,6 @@ test.describe('DataTable @avt', () => { await page.keyboard.press('Shift+Tab'); await page.keyboard.press('Shift+Tab'); await page.keyboard.press('Shift+Tab'); - await page.keyboard.press('Shift+Tab'); - await page.keyboard.press('Shift+Tab'); await page .getByRole('heading', { name: 'Expandable row content' }) diff --git a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap index b52f35d08ff2..9b94f0ef8686 100644 --- a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap +++ b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap @@ -515,6 +515,7 @@ exports[`DataTable behaves as expected selection should render and match snapsho id="custom-id" placeholder="Filter table" role="searchbox" + tabindex="0" type="text" value="" /> @@ -941,6 +942,7 @@ exports[`DataTable renders as expected - Component API should render and match s id="custom-id" placeholder="Filter table" role="searchbox" + tabindex="0" type="text" value="" /> diff --git a/packages/react/src/components/DataTable/__tests__/__snapshots__/TableToolbarSearch-test.js.snap b/packages/react/src/components/DataTable/__tests__/__snapshots__/TableToolbarSearch-test.js.snap index 6eb7f7836dd1..920ba83afd66 100644 --- a/packages/react/src/components/DataTable/__tests__/__snapshots__/TableToolbarSearch-test.js.snap +++ b/packages/react/src/components/DataTable/__tests__/__snapshots__/TableToolbarSearch-test.js.snap @@ -40,6 +40,7 @@ exports[`TableToolbarSearch renders as expected - Component API should render 1` id="custom-id" placeholder="Filter table" role="searchbox" + tabindex="0" type="text" value="" /> diff --git a/packages/react/src/components/DataTable/stories/dynamic-content/DataTable-dynamic-content.stories.js b/packages/react/src/components/DataTable/stories/dynamic-content/DataTable-dynamic-content.stories.js index 83185d03e76f..13c57dade2fd 100644 --- a/packages/react/src/components/DataTable/stories/dynamic-content/DataTable-dynamic-content.stories.js +++ b/packages/react/src/components/DataTable/stories/dynamic-content/DataTable-dynamic-content.stories.js @@ -154,8 +154,16 @@ export const Default = () => { - - + + Add row @@ -328,8 +336,14 @@ export const Playground = (args) => { action('TableToolbarSearch - onChange')(evt); onInputChange(evt); }} + tabIndex={ + batchActionProps.shouldShowBatchActions ? -1 : 0 + } /> - + { action('handleOnRowAdd')(evt); diff --git a/packages/react/src/components/Search/Search.tsx b/packages/react/src/components/Search/Search.tsx index ad9e10bbaa14..cfb765b34bc8 100644 --- a/packages/react/src/components/Search/Search.tsx +++ b/packages/react/src/components/Search/Search.tsx @@ -243,7 +243,6 @@ const Search = React.forwardRef(function Search( {labelText} (function Search( type={type} value={value} tabIndex={onExpand && !isExpanded ? -1 : undefined} + {...rest} />