diff --git a/src/plugins/discover/public/application/components/data_grid/data_grid_table_docview_expand_button.tsx b/src/plugins/discover/public/application/components/data_grid/data_grid_table_docview_expand_button.tsx index beb8e7de278a..823951a58493 100644 --- a/src/plugins/discover/public/application/components/data_grid/data_grid_table_docview_expand_button.tsx +++ b/src/plugins/discover/public/application/components/data_grid/data_grid_table_docview_expand_button.tsx @@ -4,23 +4,24 @@ */ import React from 'react'; +import { i18n } from '@osd/i18n'; import { EuiToolTip, EuiButtonIcon, EuiDataGridCellValueElementProps } from '@elastic/eui'; import { useDataGridContext } from './data_grid_table_context'; -export const DocViewExpandButton = ({ - rowIndex, - setCellProps, -}: EuiDataGridCellValueElementProps) => { +export const DocViewExpandButton = ({ rowIndex }: EuiDataGridCellValueElementProps) => { const { expandedHit, setExpandedHit, rows } = useDataGridContext(); const currentExpanded = rows[rowIndex]; const isCurrentExpanded = currentExpanded === expandedHit; + const inspectHintMsg = i18n.translate('discover.docViews.table.inspectAriaLabel', { + defaultMessage: 'Inspect document details', + }); return ( - + setExpandedHit(isCurrentExpanded ? undefined : currentExpanded)} - iconType={isCurrentExpanded ? 'minimize' : 'expand'} - aria-label={`Expand row ${rowIndex}`} + iconType={isCurrentExpanded ? 'minimize' : 'inspect'} + aria-label={inspectHintMsg} /> );