fixing React warning about missing prop (#30147)

* fixing React warning about missing prop

* removing redundant aria-label
This commit is contained in:
Bill McConaghy 2019-02-05 18:14:40 -05:00 committed by GitHub
parent 2f92df5ee3
commit b71144074a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,19 +18,20 @@ export const renderBadges = (index, filterChanged) => {
&& filterExpression
&& filterChanged(EuiSearchBar.Query.parse(filterExpression));
};
const ariaLabel = i18n.translate(
'xpack.idxMgmt.badgeAriaLabel',
{
defaultMessage: '{label}. Select to filter on this.',
values: { label },
},
);
badgeLabels.push(
<Fragment key={label}>
{' '}
<EuiBadge
color={color}
onClick={clickHandler}
aria-label={i18n.translate(
'xpack.idxMgmt.badgeAriaLabel',
{
defaultMessage: '{label}. Select to filter on this.',
values: { label },
},
)}
onClickAriaLabel={ariaLabel}
>
{label}
</EuiBadge>