@@ -358,14 +319,11 @@ exports[`EuiStat props right is rendered 1`] = `
title
@@ -385,14 +343,11 @@ exports[`EuiStat props s is rendered 1`] = `
title
@@ -412,14 +367,11 @@ exports[`EuiStat props subdued is rendered 1`] = `
title
@@ -439,14 +391,11 @@ exports[`EuiStat props success is rendered 1`] = `
title
@@ -464,7 +413,6 @@ exports[`EuiStat props title and description are reversed 1`] = `
class="euiStat emotion-euiStat-left"
>
title
@@ -472,9 +420,7 @@ exports[`EuiStat props title and description are reversed 1`] = `
@@ -493,14 +439,11 @@ exports[`EuiStat props xs is rendered 1`] = `
title
@@ -520,14 +463,11 @@ exports[`EuiStat props xxs is rendered 1`] = `
title
@@ -547,14 +487,11 @@ exports[`EuiStat props xxxs is rendered 1`] = `
title
diff --git a/packages/eui/src/components/stat/stat.tsx b/packages/eui/src/components/stat/stat.tsx
index d7525f3a9d3..d8bdf8690d5 100644
--- a/packages/eui/src/components/stat/stat.tsx
+++ b/packages/eui/src/components/stat/stat.tsx
@@ -93,13 +93,9 @@ export const EuiStat: FunctionComponent<
const cssStyles = [styles.euiStat, styles[textAlign]];
const classes = classNames('euiStat', className);
- const commonProps: HTMLAttributes = {
- 'aria-hidden': true,
- };
-
const descriptionDisplay = (
- {createElement(descriptionElement, commonProps, description)}
+ {createElement(descriptionElement, {}, description)}
);
@@ -110,14 +106,15 @@ export const EuiStat: FunctionComponent<
isNamedTitleColor && titleStyles[titleColor as TitleColor],
isLoading && titleStyles.isLoading,
];
- const titleProps = isNamedTitleColor
- ? commonProps
- : { ...commonProps, style: { color: titleColor } };
const titleChildren = isLoading ? '--' : title;
const titleDisplay = (
- {createElement(titleElement, titleProps, titleChildren)}
+ {createElement(
+ titleElement,
+ isNamedTitleColor ? {} : { style: { color: titleColor } },
+ titleChildren
+ )}
);