diff --git a/x-pack/platform/plugins/private/watcher/public/application/components/delete_watches_modal.tsx b/x-pack/platform/plugins/private/watcher/public/application/components/delete_watches_modal.tsx index 844e210de26f1..a22aba5a71d60 100644 --- a/x-pack/platform/plugins/private/watcher/public/application/components/delete_watches_modal.tsx +++ b/x-pack/platform/plugins/private/watcher/public/application/components/delete_watches_modal.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiConfirmModal } from '@elastic/eui'; +import { EuiConfirmModal, useGeneratedHtmlId } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { deleteWatches } from '../lib/api'; @@ -20,6 +20,9 @@ export const DeleteWatchesModal = ({ }) => { const { toasts } = useAppContext(); const numWatchesToDelete = watchesToDelete.length; + + const modalTitleId = useGeneratedHtmlId({ prefix: 'deleteWatchModal' }); + if (!numWatchesToDelete) { return null; } @@ -83,6 +86,8 @@ export const DeleteWatchesModal = ({ }} cancelButtonText={cancelButtonText} confirmButtonText={confirmButtonText} + aria-labelledby={modalTitleId} + titleProps={{ id: modalTitleId }} > {confirmModalText} diff --git a/x-pack/platform/plugins/private/watcher/public/application/sections/watch_status_page/components/execution_history_panel.tsx b/x-pack/platform/plugins/private/watcher/public/application/sections/watch_status_page/components/execution_history_panel.tsx index 5abca77811c92..dee7bb920a7c2 100644 --- a/x-pack/platform/plugins/private/watcher/public/application/sections/watch_status_page/components/execution_history_panel.tsx +++ b/x-pack/platform/plugins/private/watcher/public/application/sections/watch_status_page/components/execution_history_panel.tsx @@ -24,6 +24,7 @@ import { EuiSelect, EuiSpacer, EuiTitle, + useGeneratedHtmlId, } from '@elastic/eui'; import { PAGINATION } from '../../../../../common/constants'; @@ -99,6 +100,9 @@ export const ExecutionHistoryPanel = () => { ? JSON.stringify(watchHistoryDetails.details, null, 2) : ''; + const watchHistoryDetailFlyoutId = useGeneratedHtmlId({ prefix: 'watchFlyout' }); + const watchHistoryErrorDetailsFlyoutTitleId = useGeneratedHtmlId({ prefix: 'watchErrorFlyout' }); + if (historyError) { return ( @@ -229,12 +233,12 @@ export const ExecutionHistoryPanel = () => { setDetailWatchId(undefined)} - aria-labelledby="watchHistoryErrorDetailsFlyoutTitle" + aria-labelledby={watchHistoryErrorDetailsFlyoutTitleId} maxWidth={600} > -

+

{ setDetailWatchId(undefined)} - aria-labelledby="watchHistoryDetailsFlyoutTitle" + aria-labelledby={watchHistoryDetailFlyoutId} maxWidth={600} > -

+