From 05686c8c078d66c7b13a31263860bb6fed1deb54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 09:41:36 +0000 Subject: [PATCH 1/6] Initial plan From b7a9de2a3f28be640b6a88ae944ffe334a1b2879 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:02:14 +0000 Subject: [PATCH 2/6] fix(ml): add accessible labels to scatterplot matrix switch buttons Fixes the "Random scoring" and "Dynamic size" switch buttons in the ML Results Explorer to use descriptive labels (`showLabel={false}`) so screen readers announce the title (e.g., "Random scoring, off, switch") instead of just "Off, off, switch". Removes unused TOGGLE_ON/TOGGLE_OFF constants and their translations. Agent-Logs-Url: https://github.com/elastic/kibana/sessions/933567f0-653f-4427-98dc-724292467a02 Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com> --- .../translations/translations/de-DE.json | 2 -- .../translations/translations/fr-FR.json | 2 -- .../translations/translations/ja-JP.json | 2 -- .../translations/translations/zh-CN.json | 2 -- .../scatterplot_matrix/scatterplot_matrix.tsx | 17 ++++++++--------- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/x-pack/platform/plugins/private/translations/translations/de-DE.json b/x-pack/platform/plugins/private/translations/translations/de-DE.json index fca333a5a69ca..f8d3158fd044e 100644 --- a/x-pack/platform/plugins/private/translations/translations/de-DE.json +++ b/x-pack/platform/plugins/private/translations/translations/de-DE.json @@ -29305,8 +29305,6 @@ "xpack.ml.splom.randomScoringLabel": "Zufällige Wertung", "xpack.ml.splom.sampleSizeInfoTooltip": "Anzahl der Dokumente, die in der Streudiagrammmatrix angezeigt werden sollen.", "xpack.ml.splom.sampleSizeLabel": "Stichprobengröße", - "xpack.ml.splom.toggleOff": "Aus", - "xpack.ml.splom.toggleOn": "An", "xpack.ml.splomSpec.outlierScoreThresholdName": "Schwellenwert für Ausreißerwert:", "xpack.ml.stepDefineForm.invalidQuery": "Ungültige Abfrage", "xpack.ml.stepDefineForm.queryPlaceholderKql": "Suchen Sie z. B. nach {example}", diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 9d4588b28c234..44936ba9f14bd 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -29327,8 +29327,6 @@ "xpack.ml.splom.randomScoringLabel": "Scores aléatoires", "xpack.ml.splom.sampleSizeInfoTooltip": "Quantité de documents à afficher dans la matrice de nuages de points.", "xpack.ml.splom.sampleSizeLabel": "Taille de l'échantillon", - "xpack.ml.splom.toggleOff": "Arrêt", - "xpack.ml.splom.toggleOn": "Marche", "xpack.ml.splomSpec.outlierScoreThresholdName": "Seuil de score d'aberrations :", "xpack.ml.stepDefineForm.invalidQuery": "Requête non valide", "xpack.ml.stepDefineForm.queryPlaceholderKql": "Rechercher par ex. {example}", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index ce4db5b211ecd..12ae8d61cf5bb 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -29421,8 +29421,6 @@ "xpack.ml.splom.randomScoringLabel": "ランダムスコアリング", "xpack.ml.splom.sampleSizeInfoTooltip": "散布図マトリックスに表示するドキュメントの数。", "xpack.ml.splom.sampleSizeLabel": "サンプルサイズ", - "xpack.ml.splom.toggleOff": "オフ", - "xpack.ml.splom.toggleOn": "オン", "xpack.ml.splomSpec.outlierScoreThresholdName": "異常スコアしきい値:", "xpack.ml.stepDefineForm.invalidQuery": "無効なクエリー", "xpack.ml.stepDefineForm.queryPlaceholderKql": "{example}の検索", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index ee3ef8625df0a..9870fb9906900 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -29420,8 +29420,6 @@ "xpack.ml.splom.randomScoringLabel": "随机评分", "xpack.ml.splom.sampleSizeInfoTooltip": "在散点图矩阵中药显示的文档数量。", "xpack.ml.splom.sampleSizeLabel": "样例大小", - "xpack.ml.splom.toggleOff": "关闭", - "xpack.ml.splom.toggleOn": "开启", "xpack.ml.splomSpec.outlierScoreThresholdName": "离群值分数阈值:", "xpack.ml.stepDefineForm.invalidQuery": "无效查询", "xpack.ml.stepDefineForm.queryPlaceholderKql": "搜索,如 {example})", diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index d7304c3f8fa37..3d6639dbfa219 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -73,13 +73,6 @@ const SCATTERPLOT_MATRIX_DEFAULT_FETCH_SIZE = 1000; const SCATTERPLOT_MATRIX_DEFAULT_FETCH_MIN_SIZE = 1; const SCATTERPLOT_MATRIX_DEFAULT_FETCH_MAX_SIZE = 10000; -const TOGGLE_ON = i18n.translate('xpack.ml.splom.toggleOn', { - defaultMessage: 'On', -}); -const TOGGLE_OFF = i18n.translate('xpack.ml.splom.toggleOff', { - defaultMessage: 'Off', -}); - const sampleSizeOptions = [100, 1000, 10000].map((d) => ({ value: d, text: '' + d })); interface OptionLabelWithIconTipProps { @@ -513,7 +506,10 @@ export const ScatterplotMatrix: FC = ({ = ({ > Date: Thu, 23 Apr 2026 08:20:51 +0000 Subject: [PATCH 3/6] refactor(ml): remove OptionLabelWithIconTip, use EuiFormRow labelAppend for tooltips Address reviewer feedback: - Remove OptionLabelWithIconTip component and interface - Move tooltip icons into EuiFormRow labelAppend prop - Use plain text strings for EuiFormRow labels for proper accessibility Agent-Logs-Url: https://github.com/elastic/kibana/sessions/3c3e3474-81fc-4464-af07-d41e9a912d85 Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com> --- .../scatterplot_matrix/scatterplot_matrix.tsx | 70 ++++++++----------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index 3d6639dbfa219..84d7ccc23486e 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -75,24 +75,6 @@ const SCATTERPLOT_MATRIX_DEFAULT_FETCH_MAX_SIZE = 10000; const sampleSizeOptions = [100, 1000, 10000].map((d) => ({ value: d, text: '' + d })); -interface OptionLabelWithIconTipProps { - label: string; - tooltip: string; -} - -const OptionLabelWithIconTip: FC = ({ label, tooltip }) => ( - <> - {label} - - -); - function filterChartableItems(items: estypes.SearchHit[], resultsField?: string) { return ( items @@ -434,14 +416,15 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -465,14 +448,15 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -489,15 +473,16 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -519,14 +504,15 @@ export const ScatterplotMatrix: FC = ({ {resultsField !== undefined && legendType === undefined && ( } display="rowCompressed" From 42d16bb3e4e25330c8de9256fb5b19d8d9abf5b5 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Fri, 24 Apr 2026 13:33:10 +0300 Subject: [PATCH 4/6] cleanup --- .../components/scatterplot_matrix/scatterplot_matrix.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index 84d7ccc23486e..c547f6a6c0546 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -491,9 +491,6 @@ export const ScatterplotMatrix: FC = ({ Date: Fri, 24 Apr 2026 14:15:52 +0300 Subject: [PATCH 5/6] cleanup --- .../components/scatterplot_matrix/scatterplot_matrix.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index c547f6a6c0546..7a4245bea9b44 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -491,6 +491,7 @@ export const ScatterplotMatrix: FC = ({ = ({ > Date: Tue, 28 Apr 2026 17:30:41 +0300 Subject: [PATCH 6/6] cleanup --- .../scatterplot_matrix/scatterplot_matrix.tsx | 65 +++++++++++-------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index 7a4245bea9b44..69c97c6cd5c70 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -75,6 +75,19 @@ const SCATTERPLOT_MATRIX_DEFAULT_FETCH_MAX_SIZE = 10000; const sampleSizeOptions = [100, 1000, 10000].map((d) => ({ value: d, text: '' + d })); +interface OptionLabelWithIconTipProps { + label: string; + tooltip: string; +} + +const OptionLabelWithIconTip: FC = ({ label, tooltip }) => ( + + {label} +   + + +); + function filterChartableItems(items: estypes.SearchHit[], resultsField?: string) { return ( items @@ -416,15 +429,14 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -448,15 +460,14 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -473,16 +484,15 @@ export const ScatterplotMatrix: FC = ({ } display="rowCompressed" @@ -502,15 +512,14 @@ export const ScatterplotMatrix: FC = ({ {resultsField !== undefined && legendType === undefined && ( } display="rowCompressed"