[8.x] fix: [Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit model snapshot flyout missing title from announcement (#217831) (#218274)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit
model snapshot flyout missing title from announcement
(#217831)](https://github.com/elastic/kibana/pull/217831)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2025-04-15T13:38:48Z","message":"fix:
[Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit model
snapshot flyout missing title from announcement (#217831)\n\nCloses:
#216147\n\n**Description**\nDialog modal, flyout, field visible title
should be announced for the\nusers, especially using assistive
technology to know what dialog modal,\nflyout opened, what field is
active and what is needed to enter in it.\n\n**Changes made:**\n\n1.
Added` aria-labelledby={flyoutTitleId} `for mentioned
places","sha":"d47e77627ac594883969066205a0888bb5034efb","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility",":ml","Feature:Anomaly
Detection","release_note:skip","backport:prev-major","v9.1.0"],"title":"fix:
[Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit model
snapshot flyout missing title from
announcement","number":217831,"url":"https://github.com/elastic/kibana/pull/217831","mergeCommit":{"message":"fix:
[Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit model
snapshot flyout missing title from announcement (#217831)\n\nCloses:
#216147\n\n**Description**\nDialog modal, flyout, field visible title
should be announced for the\nusers, especially using assistive
technology to know what dialog modal,\nflyout opened, what field is
active and what is needed to enter in it.\n\n**Changes made:**\n\n1.
Added` aria-labelledby={flyoutTitleId} `for mentioned
places","sha":"d47e77627ac594883969066205a0888bb5034efb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217831","number":217831,"mergeCommit":{"message":"fix:
[Analytics:MachineLearning:AnomalyDetection:Jobs page] Edit model
snapshot flyout missing title from announcement (#217831)\n\nCloses:
#216147\n\n**Description**\nDialog modal, flyout, field visible title
should be announced for the\nusers, especially using assistive
technology to know what dialog modal,\nflyout opened, what field is
active and what is needed to enter in it.\n\n**Changes made:**\n\n1.
Added` aria-labelledby={flyoutTitleId} `for mentioned
places","sha":"d47e77627ac594883969066205a0888bb5034efb"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
This commit is contained in:
Kibana Machine 2025-04-15 17:35:28 +02:00 committed by GitHub
parent 2e306a27f3
commit c35ce48c9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,7 @@ import {
EuiSwitch,
EuiConfirmModal,
EuiCallOut,
useGeneratedHtmlId,
} from '@elastic/eui';
import type {
@ -98,13 +99,22 @@ export const EditModelSnapshotFlyout: FC<Props> = ({ snapshot, job, closeFlyout
setDeleteModalVisible(false);
}
const flyoutTitleId = useGeneratedHtmlId({
prefix: 'editModelSnapshotFlyout',
});
return (
<>
<EuiFlyout onClose={closeWithoutReload} hideCloseButton size="m">
<EuiFlyout
onClose={closeWithoutReload}
hideCloseButton
size="m"
aria-labelledby={flyoutTitleId}
>
<EuiFlyoutBody>
<EuiFlexItem>
<EuiTitle size="s">
<h5>
<h5 id={flyoutTitleId}>
<FormattedMessage
id="xpack.ml.editModelSnapshotFlyout.title"
defaultMessage="Edit snapshot {ssId}"