use aria-hidden on all icons by default

This commit is contained in:
btzr-io 2021-07-14 13:44:22 -05:00
parent 3e13930425
commit 0397617bed
2 changed files with 3 additions and 2 deletions

View file

@ -102,7 +102,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
const content = ( const content = (
<span className="button__content"> <span className="button__content">
{icon && <Icon aria-hidden icon={icon} iconColor={iconColor} size={iconSize} />} {icon && <Icon icon={icon} iconColor={iconColor} size={iconSize} />}
{!largestLabel && label && ( {!largestLabel && label && (
<span dir="auto" className="button__label"> <span dir="auto" className="button__label">
@ -139,7 +139,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
)} )}
{children && children} {children && children}
{iconRight && <Icon aria-hidden icon={iconRight} iconColor={iconColor} size={size} />} {iconRight && <Icon icon={iconRight} iconColor={iconColor} size={size} />}
</span> </span>
); );

View file

@ -73,6 +73,7 @@ class IconComponent extends React.PureComponent<Props> {
size={size || (sectionIcon ? 20 : 16)} size={size || (sectionIcon ? 20 : 16)}
className={classnames(`icon icon--${icon}`, className, { 'color-override': iconColor })} className={classnames(`icon icon--${icon}`, className, { 'color-override': iconColor })}
color={color} color={color}
aria-hidden
{...rest} {...rest}
/> />
); );