Skip to content

Commit cea79ff

Browse files
[8.18] fix: [Analytics:Graph page]Dialog modal missing title from announcement (elastic#217827) (elastic#218423)
# Backport This will backport the following commits from `main` to `8.18`: - [fix: [Analytics:Graph page]Dialog modal missing title from announcement (elastic#217827)](elastic#217827) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexey Antonov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-16T12:03:38Z","message":"fix: [Analytics:Graph page]Dialog modal missing title from announcement (elastic#217827)\n\nCloses: elastic#214760\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. Set correct value for` aria-labelledby` attr.","sha":"b91da375a3c965181e2b2ee6f899d42ee6dcc0f0","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","backport:prev-major","v9.1.0"],"title":"fix: [Analytics:Graph page]Dialog modal missing title from announcement","number":217827,"url":"https://github.com/elastic/kibana/pull/217827","mergeCommit":{"message":"fix: [Analytics:Graph page]Dialog modal missing title from announcement (elastic#217827)\n\nCloses: elastic#214760\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. Set correct value for` aria-labelledby` attr.","sha":"b91da375a3c965181e2b2ee6f899d42ee6dcc0f0"}},"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/217827","number":217827,"mergeCommit":{"message":"fix: [Analytics:Graph page]Dialog modal missing title from announcement (elastic#217827)\n\nCloses: elastic#214760\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. Set correct value for` aria-labelledby` attr.","sha":"b91da375a3c965181e2b2ee6f899d42ee6dcc0f0"}}]}] BACKPORT--> Co-authored-by: Alexey Antonov <[email protected]>
1 parent 39e48f1 commit cea79ff

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/core/packages/overlays/browser/src/modal.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import type { EuiConfirmModalProps } from '@elastic/eui';
10+
import type { EuiConfirmModalProps, EuiModalProps } from '@elastic/eui';
1111
import type { MountPoint, OverlayRef } from '@kbn/core-mount-utils-browser';
1212

1313
/**
@@ -22,6 +22,7 @@ export interface OverlayModalConfirmOptions {
2222
'data-test-subj'?: string;
2323
defaultFocusedButton?: EuiConfirmModalProps['defaultFocusedButton'];
2424
buttonColor?: EuiConfirmModalProps['buttonColor'];
25+
'aria-labelledby'?: EuiConfirmModalProps['aria-labelledby'];
2526
/**
2627
* Sets the max-width of the modal.
2728
* Set to `true` to use the default (`euiBreakpoints 'm'`),
@@ -66,4 +67,5 @@ export interface OverlayModalOpenOptions {
6667
closeButtonAriaLabel?: string;
6768
'data-test-subj'?: string;
6869
maxWidth?: boolean | number | string;
70+
'aria-labelledby'?: EuiModalProps['aria-labelledby'];
6971
}

x-pack/platform/plugins/private/graph/public/components/source_modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function SourceModal(props: SourcePickerProps) {
1515
return (
1616
<div className="gphSourceModal">
1717
<EuiModalHeader>
18-
<EuiModalHeaderTitle>
18+
<EuiModalHeaderTitle id="source-modal-title">
1919
<FormattedMessage
2020
id="xpack.graph.sourceModal.title"
2121
defaultMessage="Select a data source"

x-pack/platform/plugins/private/graph/public/services/source_modal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export function openSourceModal(
3232
onSelected(indexPattern);
3333
modalRef.close();
3434
}}
35-
/>
35+
/>,
36+
{
37+
'aria-labelledby': 'source-modal-title',
38+
}
3639
);
3740
}

0 commit comments

Comments
 (0)