mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
fix: [Rules > Rule detail][AXE-CORE]: Interactive controls must not be nested (#177278)
Closes: https://github.com/elastic/security-team/issues/8617
# Description
The [axe browser plugin](https://deque.com/axe) is reporting a nested
button (interactive control)in the Rule detail view for toggling the
Elastic AI assistant. This PR address that issue by removing extra
`EuiButton` wrapping
# Screens

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
45ce4c3f31
commit
03a737266f
1 changed files with 12 additions and 14 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { EuiButton, EuiCallOut, EuiCodeBlock } from '@elastic/eui';
|
||||
import { EuiCallOut, EuiCodeBlock } from '@elastic/eui';
|
||||
|
||||
import { NewChat } from '@kbn/elastic-assistant';
|
||||
import { FormattedDate } from '../../../../common/components/formatted_date';
|
||||
|
@ -76,19 +76,17 @@ const RuleStatusFailedCallOutComponent: React.FC<RuleStatusFailedCallOutProps> =
|
|||
{message}
|
||||
</EuiCodeBlock>
|
||||
{hasAssistantPrivilege && (
|
||||
<EuiButton color={color} size="s">
|
||||
<NewChat
|
||||
category="detection-rules"
|
||||
color={color}
|
||||
conversationId={i18nAssistant.DETECTION_RULES_CONVERSATION_ID}
|
||||
description={i18n.ASK_ASSISTANT_DESCRIPTION}
|
||||
getPromptContext={getPromptContext}
|
||||
suggestedUserPrompt={i18n.ASK_ASSISTANT_USER_PROMPT}
|
||||
tooltip={i18n.ASK_ASSISTANT_TOOLTIP}
|
||||
>
|
||||
{i18n.ASK_ASSISTANT_ERROR_BUTTON}
|
||||
</NewChat>
|
||||
</EuiButton>
|
||||
<NewChat
|
||||
category="detection-rules"
|
||||
color={color}
|
||||
conversationId={i18nAssistant.DETECTION_RULES_CONVERSATION_ID}
|
||||
description={i18n.ASK_ASSISTANT_DESCRIPTION}
|
||||
getPromptContext={getPromptContext}
|
||||
suggestedUserPrompt={i18n.ASK_ASSISTANT_USER_PROMPT}
|
||||
tooltip={i18n.ASK_ASSISTANT_TOOLTIP}
|
||||
>
|
||||
{i18n.ASK_ASSISTANT_ERROR_BUTTON}
|
||||
</NewChat>
|
||||
)}
|
||||
</EuiCallOut>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue