From 0461ee321c9489912bf0f72e3049105a468b2f1a Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 28 Nov 2024 03:14:19 +1100 Subject: [PATCH] [8.x] fix: [Search:AppSearch:Engines:Schema page]Add a new field modal dialog missing title from announcement (#201786) (#201996) # Backport This will backport the following commits from `main` to `8.x`: - [fix: [Search:AppSearch:Engines:Schema page]Add a new field modal dialog missing title from announcement (#201786)](https://github.com/elastic/kibana/pull/201786) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Alexey Antonov --- .../shared/schema/add_field_modal/index.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx index 32191abbbae21..b717de04d21da 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx @@ -22,6 +22,7 @@ import { EuiModalHeader, EuiModalHeaderTitle, EuiSpacer, + useGeneratedHtmlId, } from '@elastic/eui'; import { SchemaFieldTypeSelect } from '..'; @@ -78,10 +79,12 @@ export const SchemaAddFieldModal: React.FC = ({ ? FIELD_NAME_CORRECTED_NOTE(formattedFieldName) : FIELD_NAME_CORRECT_NOTE; + const modalTitleId = useGeneratedHtmlId(); + return ( - + - {ADD_FIELD_MODAL_TITLE} + {ADD_FIELD_MODAL_TITLE} = ({ - {CANCEL_BUTTON_LABEL} + + {CANCEL_BUTTON_LABEL} +