Skip to content

Commit

Permalink
[8.13] fix: [Rules > Rule detail][AXE-CORE]: Interactive controls …
Browse files Browse the repository at this point in the history
…must not be nested (elastic#177278) (elastic#177556)

# Backport

This will backport the following commits from `main` to `8.13`:
- [fix: [Rules > Rule detail][AXE-CORE]: Interactive controls must
not be nested (elastic#177278)](elastic#177278)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-22T09:02:30Z","message":"fix:
[Rules > Rule detail][AXE-CORE]: Interactive controls must not be nested
(elastic#177278)\n\nCloses:
https://github.com/elastic/security-team/issues/8617\r\n\r\n#
Description \r\n\r\nThe [axe browser plugin](https://deque.com/axe) is
reporting a nested\r\nbutton (interactive control)in the Rule detail
view for toggling the\r\nElastic AI assistant. This PR address that
issue by removing extra\r\n`EuiButton` wrapping\r\n\r\n# Screens
\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/4fa51c27-eb82-46d3-a071-5d29e944aa5e)\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"03a737266fa731dd490ed77abe865903d65ef7bc","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Rule Details","v8.13.0","v8.14.0"],"title":"fix:
[Rules > Rule detail][AXE-CORE]: Interactive controls must not be
nested","number":177278,"url":"https://github.com/elastic/kibana/pull/177278","mergeCommit":{"message":"fix:
[Rules > Rule detail][AXE-CORE]: Interactive controls must not be nested
(elastic#177278)\n\nCloses:
https://github.com/elastic/security-team/issues/8617\r\n\r\n#
Description \r\n\r\nThe [axe browser plugin](https://deque.com/axe) is
reporting a nested\r\nbutton (interactive control)in the Rule detail
view for toggling the\r\nElastic AI assistant. This PR address that
issue by removing extra\r\n`EuiButton` wrapping\r\n\r\n# Screens
\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/4fa51c27-eb82-46d3-a071-5d29e944aa5e)\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"03a737266fa731dd490ed77abe865903d65ef7bc"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177278","number":177278,"mergeCommit":{"message":"fix:
[Rules > Rule detail][AXE-CORE]: Interactive controls must not be nested
(elastic#177278)\n\nCloses:
https://github.com/elastic/security-team/issues/8617\r\n\r\n#
Description \r\n\r\nThe [axe browser plugin](https://deque.com/axe) is
reporting a nested\r\nbutton (interactive control)in the Rule detail
view for toggling the\r\nElastic AI assistant. This PR address that
issue by removing extra\r\n`EuiButton` wrapping\r\n\r\n# Screens
\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/4fa51c27-eb82-46d3-a071-5d29e944aa5e)\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"03a737266fa731dd490ed77abe865903d65ef7bc"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <[email protected]>
  • Loading branch information
kibanamachine and alexwizp authored Feb 22, 2024
1 parent 5946741 commit ba53b41
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit ba53b41

Please sign in to comment.