-
columnB, column 2, row 1
+ -
+ Press the Enter key to expand this cell.
-
someColumn, column 1, row 1
+ -
+ Press the Enter key to expand this cell.
+ {cellActions && (
+ <>
+ {' - '}
+
+ >
+ )}
);
diff --git a/src/components/datagrid/body/cell/focus_utils.test.tsx b/src/components/datagrid/body/cell/focus_utils.test.tsx
index 1dcbccacb071..a35407d00dce 100644
--- a/src/components/datagrid/body/cell/focus_utils.test.tsx
+++ b/src/components/datagrid/body/cell/focus_utils.test.tsx
@@ -124,6 +124,23 @@ describe('HandleInteractiveChildren', () => {
});
describe('FocusTrappedChildren', () => {
+ it('renders a screen reader hint', () => {
+ const cell = getCellWithInteractiveChildren();
+ const { container } = render(
);
+ expect(container.childNodes[1]).toMatchInlineSnapshot(`
+
+
+ -
+ Press the Enter key to interact with this cell's contents.
+
+
+ `);
+ });
+
describe('on enter', () => {
it('enables the focus trap, all interactive children, and moves focus to the first focusable child', () => {
const cell = getCellWithInteractiveChildren();
diff --git a/src/components/datagrid/body/cell/focus_utils.tsx b/src/components/datagrid/body/cell/focus_utils.tsx
index 77b655eb6cb5..4d425244f839 100644
--- a/src/components/datagrid/body/cell/focus_utils.tsx
+++ b/src/components/datagrid/body/cell/focus_utils.tsx
@@ -17,6 +17,8 @@ import { tabbable } from 'tabbable';
import { keys } from '../../../../services';
import { EuiFocusTrap } from '../../../focus_trap';
+import { EuiScreenReaderOnly } from '../../../accessibility';
+import { EuiI18n } from '../../../i18n';
/**
* This internal utility component is used by all cells, both header and body/footer cells.
@@ -120,6 +122,17 @@ export const FocusTrappedChildren: FunctionComponent<
clickOutsideDisables={true}
>
{children}
+
+
+
+ {' - '}
+
+
+
);
};