diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.tsx index 25fcf6f942c67..df4e9c296a598 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.tsx @@ -8,6 +8,7 @@ import React, { memo, useCallback, useMemo } from 'react'; import type { EuiSwitchProps } from '@elastic/eui'; import { EuiFlexItem, EuiSwitch } from '@elastic/eui'; import type { RuleResponse } from '../../../../../../../common/api/detection_engine'; +import * as i18n from './translations'; export const LinkRuleSwitch = memo( ({ @@ -35,7 +36,12 @@ export const LinkRuleSwitch = memo( return ( - + ); } diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/translations.ts new file mode 100644 index 0000000000000..1914672f525cb --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/translations.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const LINK_SWITCH_ARIA_LABEL = (name: string) => + i18n.translate( + 'xpack.securitySolution.rule_exceptions.flyoutComponents.addToRulesTableSelection.linkSwitch.ariaLabel', + { + values: { name }, + defaultMessage: 'Link "{name}"', + } + );