fix: [ES Serverless home] 'New' button ("Add an API Key" section) gives no context (#188391)

Closes: https://github.com/elastic/search-team/issues/7619
Closes: https://github.com/elastic/search-team/issues/7625

## Description

'New' button ("Add an API Key" section) gives no context . They are not
programmatically associated to their respective topics.

## Steps to Reproduce
1. Open a Search `Serverless` project.
2. Navigate to the `Search` project homepage.

## What was changed?: 

1. Required `aria-label` attributes were added

## Screen: 

<img width="1099" alt="image"
src="https://github.com/user-attachments/assets/8d349017-cd43-4668-8bba-43c29cf90fe2">
This commit is contained in:
Alexey Antonov 2024-07-23 12:09:28 +03:00 committed by GitHub
parent e2150dea5e
commit ac9165d5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,6 +128,12 @@ export const ApiKeyPanel = ({ setClientApiKey }: { setClientApiKey: (value: stri
fill
onClick={() => setIsFlyoutOpen(true)}
data-test-subj="new-api-key-button"
aria-label={i18n.translate(
'xpack.serverlessSearch.apiKey.newButton.ariaLabel',
{
defaultMessage: 'Add new API key',
}
)}
>
<EuiText size="s">
{i18n.translate('xpack.serverlessSearch.apiKey.newButtonLabel', {
@ -145,6 +151,9 @@ export const ApiKeyPanel = ({ setClientApiKey }: { setClientApiKey: (value: stri
href={http.basePath.prepend(MANAGEMENT_API_KEYS)}
target="_blank"
data-test-subj="manage-api-keys-button"
aria-label={i18n.translate('xpack.serverlessSearch.apiKey.manage.ariaLabel', {
defaultMessage: 'Manage API keys',
})}
>
{i18n.translate('xpack.serverlessSearch.apiKey.manageLabel', {
defaultMessage: 'Manage',