From 105ee0626d2b235ad179de09b7e627eba5c0758f Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Mon, 4 Nov 2024 18:41:48 +0200 Subject: [PATCH] fix: [Stateful: Connectors:New connector page]Copy buttons are missing their name during announcement (#198003) Closes: #197580 ## Summary All buttons should not only be clear, understandable when the user sees them, but also for the users using assistive technology. ## What was changed?: 1. `aria-label` attributes were added for mentioned buttons ## Screen: image --- .../components/generated_config_fields.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/components/generated_config_fields.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/components/generated_config_fields.tsx index 133c15f97f61c..53cbf579a940f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/components/generated_config_fields.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/components/generated_config_fields.tsx @@ -156,6 +156,10 @@ export const GeneratedConfigFields: React.FC = ({ data-test-subj="enterpriseSearchConnectorDeploymentButton" iconType="copyClipboard" onClick={copy} + aria-label={i18n.translate( + 'xpack.enterpriseSearch.connectorDeployment.copyConnectorId', + { defaultMessage: 'Copy connector ID' } + )} /> )} @@ -237,6 +241,10 @@ export const GeneratedConfigFields: React.FC = ({ isLoading={isGenerateLoading} onClick={refreshButtonClick} disabled={!connector.index_name} + aria-label={i18n.translate( + 'xpack.enterpriseSearch.connectorDeployment.refreshAPIKey', + { defaultMessage: 'Refresh an Elasticsearch API key' } + )} /> )} @@ -246,6 +254,10 @@ export const GeneratedConfigFields: React.FC = ({ data-test-subj="enterpriseSearchConnectorDeploymentButton" iconType="copyClipboard" onClick={copy} + aria-label={i18n.translate( + 'xpack.enterpriseSearch.connectorDeployment.copyIndexName', + { defaultMessage: 'Copy index name' } + )} />