Skip to content

Commit 78660ac

Browse files
alexwizpalbertoblaz
authored andcommitted
fix: Failing test: APM Cypress.x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/dependencies/dependencies·cy·ts - Dependencies dependency overview page has no detectable a11y violations on load has no detectable a11y violations on load (elastic#240832)
Closes: elastic#240813 ## Summary I’m not exactly sure why, but sometimes `Cypress` renders an empty table and other times it displays data. When the table contained data, we encountered some accessibility (a11y) violations, which I’ve now fixed in the relevant `AgentIcon` component. Tested locally 10 times
1 parent f4d26c0 commit 78660ac

File tree

2 files changed

+2
-12
lines changed
  • src/platform/packages/shared
    • kbn-apm-ui-shared/src/components/span_icon
    • kbn-custom-icons/src/components/agent_icon

2 files changed

+2
-12
lines changed

src/platform/packages/shared/kbn-apm-ui-shared/src/components/span_icon/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ interface Props extends Omit<EuiIconProps, 'type'> {
2020

2121
export function SpanIcon({ type, subtype, size = 'l', ...props }: Props) {
2222
const icon = getSpanIcon(type, subtype);
23-
const isPresentationRole =
24-
['none', 'presentation'].includes(props.role ?? '') ||
25-
['true', true].includes(props['aria-hidden'] ?? '');
2623

27-
return (
28-
<EuiIcon
29-
type={icon}
30-
size={size}
31-
title={!isPresentationRole ? type || subtype : undefined}
32-
{...props}
33-
/>
34-
);
24+
return <EuiIcon type={icon} size={size} title={type || subtype} {...props} />;
3525
}

src/platform/packages/shared/kbn-custom-icons/src/components/agent_icon/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function AgentIcon({ agentName, size = 'l', ...props }: AgentIconProps) {
2121
const theme = useEuiTheme();
2222
const icon = getAgentIcon(agentName, theme.colorMode === 'DARK');
2323

24-
return <EuiIcon type={icon} size={size} title={agentName} {...props} aria-label={agentName} />;
24+
return <EuiIcon type={icon} size={size} title={agentName} {...props} />;
2525
}
2626

2727
// eslint-disable-next-line import/no-default-export

0 commit comments

Comments
 (0)