Skip to content

Commit

Permalink
[8.x] fix: [Stateful: Home page] Most Ingest your content section but…
Browse files Browse the repository at this point in the history
…tons have duplicated actions on them (#196079) (#196301)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Stateful: Home page] Most Ingest your content section buttons
have duplicated actions on them
(#196079)](#196079)

<!--- 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-10-15T12:39:10Z","message":"fix:
[Stateful: Home page] Most Ingest your content section buttons have
duplicated actions on them (#196079)\n\nCloses: #194932\r\n\r\n##
Summary\r\n\r\nUser reaches the same button two times when navigating
using only\r\nkeyboard and it can get confusing. Also for the user using
screen reader\r\nit is also confusing if reached element is button or
link. Better for\r\nelement to get focus only one time when navigating
in sequence from one\r\nelement to another and for the user only to hear
one announcement of the\r\nelement, button or link (but not button
link).\r\n\r\n## What was changed?:\r\n\r\n1. Removed extra `EuiLinkTo`
wrapper \r\n2. `EuiButton` was replaced to `EuiButtonTo`\r\n\r\n##
Screen \r\n\r\n<img width=\"1792\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/597eb7f0-dd7b-4c14-bccd-d91dc3bdcbcf\">","sha":"5ed698182887e18d2aa6c4b6782cc636a45a1472","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"fix:
[Stateful: Home page] Most Ingest your content section buttons have
duplicated actions on
them","number":196079,"url":"https://github.com/elastic/kibana/pull/196079","mergeCommit":{"message":"fix:
[Stateful: Home page] Most Ingest your content section buttons have
duplicated actions on them (#196079)\n\nCloses: #194932\r\n\r\n##
Summary\r\n\r\nUser reaches the same button two times when navigating
using only\r\nkeyboard and it can get confusing. Also for the user using
screen reader\r\nit is also confusing if reached element is button or
link. Better for\r\nelement to get focus only one time when navigating
in sequence from one\r\nelement to another and for the user only to hear
one announcement of the\r\nelement, button or link (but not button
link).\r\n\r\n## What was changed?:\r\n\r\n1. Removed extra `EuiLinkTo`
wrapper \r\n2. `EuiButton` was replaced to `EuiButtonTo`\r\n\r\n##
Screen \r\n\r\n<img width=\"1792\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/597eb7f0-dd7b-4c14-bccd-d91dc3bdcbcf\">","sha":"5ed698182887e18d2aa6c4b6782cc636a45a1472"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196079","number":196079,"mergeCommit":{"message":"fix:
[Stateful: Home page] Most Ingest your content section buttons have
duplicated actions on them (#196079)\n\nCloses: #194932\r\n\r\n##
Summary\r\n\r\nUser reaches the same button two times when navigating
using only\r\nkeyboard and it can get confusing. Also for the user using
screen reader\r\nit is also confusing if reached element is button or
link. Better for\r\nelement to get focus only one time when navigating
in sequence from one\r\nelement to another and for the user only to hear
one announcement of the\r\nelement, button or link (but not button
link).\r\n\r\n## What was changed?:\r\n\r\n1. Removed extra `EuiLinkTo`
wrapper \r\n2. `EuiButton` was replaced to `EuiButtonTo`\r\n\r\n##
Screen \r\n\r\n<img width=\"1792\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/597eb7f0-dd7b-4c14-bccd-d91dc3bdcbcf\">","sha":"5ed698182887e18d2aa6c4b6782cc636a45a1472"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <[email protected]>
  • Loading branch information
kibanamachine and alexwizp authored Oct 15, 2024
1 parent 3ebe580 commit ebfc4d9
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {

import { i18n } from '@kbn/i18n';

import { EuiLinkTo } from '../../../../shared/react_router_helpers';
import { EuiButtonTo } from '../../../../shared/react_router_helpers';

interface IngestionCardProps {
buttonIcon: IconType;
Expand Down Expand Up @@ -78,15 +78,25 @@ export const IngestionCard: React.FC<IngestionCardProps> = ({
}
footer={
onClick ? (
<EuiButton isDisabled={isDisabled} iconType={buttonIcon} onClick={onClick} fullWidth>
<EuiButton
data-test-subj="enterpriseSearchIngestionCardButton"
isDisabled={isDisabled}
iconType={buttonIcon}
onClick={onClick}
fullWidth
>
{buttonLabel}
</EuiButton>
) : (
<EuiLinkTo to={href ?? ''} shouldNotCreateHref>
<EuiButton isDisabled={isDisabled} iconType={buttonIcon} fullWidth>
{buttonLabel}
</EuiButton>
</EuiLinkTo>
<EuiButtonTo
to={href ?? ''}
shouldNotCreateHref
isDisabled={isDisabled}
iconType={buttonIcon}
fullWidth
>
{buttonLabel}
</EuiButtonTo>
)
}
/>
Expand Down

0 comments on commit ebfc4d9

Please sign in to comment.