Skip to content

Commit 3cae7f2

Browse files
[8.19] fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly (#220073) (#220205)
# Backport This will backport the following commits from `main` to `8.19`: - [fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly (#220073)](#220073) <!--- 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-05-06T08:22:26Z","message":"fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly (#220073)\n\nCloses: #209785\n\n## Description\nThe change defaults option on add integrations page is announced as\n\"Collect abuseCH logs via API using Elastic Agent, collapsed, button'\ninstead of change defaults\n\n## Screen\n\n<img width=\"1093\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20455a4f-2549-4c08-82ca-258e1abb9b1b\"\n/>\n\n## Changes made: \n\n1. `aria-label` was set to `Change default settings for {title}`","sha":"c4519a1bd73cdbc8419d869be80e2d7e7f792529","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","Team:Fleet","backport:prev-major","v9.1.0"],"title":"fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly","number":220073,"url":"https://github.com/elastic/kibana/pull/220073","mergeCommit":{"message":"fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly (#220073)\n\nCloses: #209785\n\n## Description\nThe change defaults option on add integrations page is announced as\n\"Collect abuseCH logs via API using Elastic Agent, collapsed, button'\ninstead of change defaults\n\n## Screen\n\n<img width=\"1093\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20455a4f-2549-4c08-82ca-258e1abb9b1b\"\n/>\n\n## Changes made: \n\n1. `aria-label` was set to `Change default settings for {title}`","sha":"c4519a1bd73cdbc8419d869be80e2d7e7f792529"}},"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/220073","number":220073,"mergeCommit":{"message":"fix: [Security:Intelligence:AddIntegrations] Change defaults option on add integrations page is announced incorrectly (#220073)\n\nCloses: #209785\n\n## Description\nThe change defaults option on add integrations page is announced as\n\"Collect abuseCH logs via API using Elastic Agent, collapsed, button'\ninstead of change defaults\n\n## Screen\n\n<img width=\"1093\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20455a4f-2549-4c08-82ca-258e1abb9b1b\"\n/>\n\n## Changes made: \n\n1. `aria-label` was set to `Change default settings for {title}`","sha":"c4519a1bd73cdbc8419d869be80e2d7e7f792529"}}]}] BACKPORT--> Co-authored-by: Alexey Antonov <[email protected]>
1 parent 4cee0e8 commit 3cae7f2

File tree

1 file changed

+11
-8
lines changed
  • x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components

1 file changed

+11
-8
lines changed

x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import React, { useState, Fragment, memo, useMemo, useCallback } from 'react';
99
import styled from 'styled-components';
1010
import { FormattedMessage } from '@kbn/i18n-react';
11+
import { i18n } from '@kbn/i18n';
1112
import {
1213
EuiFlexGroup,
1314
EuiFlexItem,
@@ -17,7 +18,6 @@ import {
1718
EuiHorizontalRule,
1819
EuiSpacer,
1920
EuiButtonEmpty,
20-
htmlIdGenerator,
2121
} from '@elastic/eui';
2222

2323
import type {
@@ -157,8 +157,6 @@ export const PackagePolicyInputPanel: React.FunctionComponent<{
157157
[packageInputStreamShouldBeVisible, packageInputStreams, packagePolicyInput.streams]
158158
);
159159

160-
const titleElementId = useMemo(() => htmlIdGenerator()(), []);
161-
162160
return (
163161
<>
164162
{/* Header / input-level toggle */}
@@ -170,10 +168,7 @@ export const PackagePolicyInputPanel: React.FunctionComponent<{
170168
<EuiFlexGroup alignItems="center" gutterSize="s">
171169
<EuiFlexItem grow={false}>
172170
<EuiTitle size="xs">
173-
<h3
174-
data-test-subj="PackagePolicy.InputStreamConfig.title"
175-
id={titleElementId}
176-
>
171+
<h3 data-test-subj="PackagePolicy.InputStreamConfig.title">
177172
{packageInput.title || packageInput.type}
178173
</h3>
179174
</EuiTitle>
@@ -217,7 +212,15 @@ export const PackagePolicyInputPanel: React.FunctionComponent<{
217212
iconType={isShowingStreams ? 'arrowUp' : 'arrowDown'}
218213
iconSide="right"
219214
aria-expanded={isShowingStreams}
220-
aria-labelledby={titleElementId}
215+
aria-label={i18n.translate(
216+
'xpack.fleet.createPackagePolicy.stepConfigure.expandAriaLabel',
217+
{
218+
defaultMessage: 'Change default settings for {title}',
219+
values: {
220+
title: packageInput.title || packageInput.type,
221+
},
222+
}
223+
)}
221224
>
222225
{
223226
<FormattedMessage

0 commit comments

Comments
 (0)