From 77267fdb5fcf1ba248da10b8317c850c927411d0 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 12 Dec 2024 04:58:49 +1100 Subject: [PATCH] [8.x] fix: [Search:AppSearch:Engines:Synonyms page]Manage and Add synonym set modal dialogs missing title from announcement (#202326) (#203834) # Backport This will backport the following commits from `main` to `8.x`: - [fix: [Search:AppSearch:Engines:Synonyms page]Manage and Add synonym set modal dialogs missing title from announcement (#202326)](https://github.com/elastic/kibana/pull/202326) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Alexey Antonov --- .../synonyms/components/synonym_modal.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/components/synonym_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/components/synonym_modal.tsx index 93dbc9cea4447..ed3274112db9e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/components/synonym_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/components/synonym_modal.tsx @@ -19,6 +19,7 @@ import { EuiFlexItem, EuiButton, EuiButtonEmpty, + useGeneratedHtmlId, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -37,6 +38,7 @@ export const SynonymModal: React.FC = () => { const { isModalOpen, modalLoading, activeSynonymSet } = useValues(SynonymsLogic); const { closeModal, createSynonymSet, updateSynonymSet, deleteSynonymSet } = useActions(SynonymsLogic); + const modalTitleId = useGeneratedHtmlId(); const modalTitle = activeSynonymSet ? SYNONYM_UPDATE_TITLE : SYNONYM_CREATE_TITLE; const id = activeSynonymSet?.id || 'createNewSynonymSet'; @@ -46,9 +48,9 @@ export const SynonymModal: React.FC = () => { : (newSynonyms: string[]) => createSynonymSet(newSynonyms); return isModalOpen ? ( - + - {modalTitle} + {modalTitle} @@ -82,7 +84,12 @@ export const SynonymModal: React.FC = () => { )} - {CANCEL_BUTTON_LABEL} + + {CANCEL_BUTTON_LABEL} +