diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx index fe5b628a07fd2..2e6886af03afa 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/index.tsx @@ -26,11 +26,7 @@ import type { StepId, Step, } from '../types'; -import { - ALL_DONE_TEXT, - COLLAPSE_STEP_BUTTON_LABEL, - EXPAND_STEP_BUTTON_LABEL, -} from '../translations'; +import { ALL_DONE_TEXT, EXPAND_STEP_BUTTON_LABEL } from '../translations'; import { StepContent } from './step_content'; import { useCheckStepCompleted } from '../hooks/use_check_step_completed'; @@ -149,7 +145,8 @@ const CardStepComponent: React.FC<{ color="primary" onClick={toggleStep} iconType={isExpandedStep ? 'arrowUp' : 'arrowDown'} - aria-label={isExpandedStep ? COLLAPSE_STEP_BUTTON_LABEL : EXPAND_STEP_BUTTON_LABEL} + aria-label={EXPAND_STEP_BUTTON_LABEL(title ?? '')} + aria-expanded={isExpandedStep} size="xs" css={toggleButtonStyles} isDisabled={!hasStepContent} diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts index c263e52182175..bad766fc41a4d 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/translations.ts @@ -269,16 +269,8 @@ export const ALL_DONE_TEXT = i18n.translate( } ); -export const COLLAPSE_STEP_BUTTON_LABEL = i18n.translate( - 'xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label', - { - defaultMessage: 'Collapse', - } -); - -export const EXPAND_STEP_BUTTON_LABEL = i18n.translate( - 'xpack.securitySolution.onboarding.togglePanel.expandStepButton.label', - { - defaultMessage: 'Expand', - } -); +export const EXPAND_STEP_BUTTON_LABEL = (title: string) => + i18n.translate('xpack.securitySolution.onboarding.togglePanel.expandStepButton.ariaLabel', { + defaultMessage: 'Expand "{title}"', + values: { title }, + }); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 8fb5b6c8f221a..fca439cd4c77f 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -37257,11 +37257,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "Afficher les alertes", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "afficher les alertes", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "afficher les tableaux de bord", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "Réduire", "xpack.securitySolution.onboarding.togglePanel.done.title": "Étape terminée", "xpack.securitySolution.onboarding.togglePanel.empty.description": "Activez une bascule pour poursuivre votre expérience \"Démarrer\" organisée", "xpack.securitySolution.onboarding.togglePanel.empty.title": "Hmm, on dirait qu’il n’y a rien ici", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "Développer", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "Marquer comme terminé", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "Analyse", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "Cloud", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index ca392e88b3a51..ef5d31f62c682 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -37226,11 +37226,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "アラートを表示", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "アラートを表示", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "ダッシュボードを表示", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "縮小", "xpack.securitySolution.onboarding.togglePanel.done.title": "ステップ完了", "xpack.securitySolution.onboarding.togglePanel.empty.description": "トグルをオンにすると、キュレーションされた「基本操作」エクスペリエンスを続行できます", "xpack.securitySolution.onboarding.togglePanel.empty.title": "何もないようです", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "拡張", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "完了に設定", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "分析", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "クラウド", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index d690125c9de2b..494fc72f0396e 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -37269,11 +37269,9 @@ "xpack.securitySolution.onboarding.task.viewAlerts": "查看告警", "xpack.securitySolution.onboarding.task.viewAlerts.callout.title": "查看告警", "xpack.securitySolution.onboarding.task.viewDashboards.callout.title": "查看仪表板", - "xpack.securitySolution.onboarding.togglePanel.collapseStepButton.label": "折叠", "xpack.securitySolution.onboarding.togglePanel.done.title": "步骤已完成", "xpack.securitySolution.onboarding.togglePanel.empty.description": "打开切换按钮,继续您策展的“开始使用”体验", "xpack.securitySolution.onboarding.togglePanel.empty.title": "嗯,那里似乎没有任何内容", - "xpack.securitySolution.onboarding.togglePanel.expandStepButton.label": "展开", "xpack.securitySolution.onboarding.togglePanel.markAsDoneTitle": "标记为已完成", "xpack.securitySolution.onboarding.togglePanel.productBadge.analytics": "分析", "xpack.securitySolution.onboarding.togglePanel.productBadge.cloud": "云",