[a11y][ml] fix screen reader not reading tooltip p-value (#224666)

## Summary
This PR fixes [[ML] Change point detection: p-value tooltip is not
announced because lack of
focus](https://github.com/elastic/kibana/issues/216545) issue.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Paulina Shakirova 2025-06-26 17:16:10 +02:00 committed by GitHub
parent 6cea1b0b6a
commit b0704474f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,9 +8,7 @@
import { import {
EuiBadge, EuiBadge,
EuiEmptyPrompt, EuiEmptyPrompt,
EuiIcon,
EuiInMemoryTable, EuiInMemoryTable,
EuiToolTip,
type DefaultItemAction, type DefaultItemAction,
type EuiBasicTableColumn, type EuiBasicTableColumn,
} from '@elastic/eui'; } from '@elastic/eui';
@ -181,21 +179,15 @@ export const ChangePointsTable: FC<ChangePointsTableProps> = ({
id: 'pValue', id: 'pValue',
'data-test-subj': 'aiopsChangePointPValue', 'data-test-subj': 'aiopsChangePointPValue',
field: 'p_value', field: 'p_value',
name: ( name: i18n.translate('xpack.aiops.changePointDetection.pValueColumn', {
<EuiToolTip defaultMessage: 'p-value',
content={i18n.translate('xpack.aiops.changePointDetection.pValueTooltip', { }),
defaultMessage: nameTooltip: {
'Indicates how extreme the change is. Lower values indicate greater change.', content: i18n.translate('xpack.aiops.changePointDetection.pValueTooltip', {
})} defaultMessage:
> 'Indicates how extreme the change is. Lower values indicate greater change.',
<span> }),
{i18n.translate('xpack.aiops.changePointDetection.pValueLabel', { },
defaultMessage: 'p-value',
})}
<EuiIcon size="s" color="subdued" type="question" className="eui-alignTop" />
</span>
</EuiToolTip>
),
sortable: true, sortable: true,
truncateText: false, truncateText: false,
render: (pValue: ChangePointAnnotation['p_value']) => render: (pValue: ChangePointAnnotation['p_value']) =>