use aria-hidden for icons indside buttons

use aria-expanded for sidebar menu button
This commit is contained in:
btzr-io 2021-07-13 16:23:29 -05:00
parent 9f18822754
commit c11b73d117
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 icon={icon} iconColor={iconColor} size={iconSize} />} {icon && <Icon aria-hidden 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 icon={iconRight} iconColor={iconColor} size={size} />} {iconRight && <Icon aria-hidden icon={iconRight} iconColor={iconColor} size={size} />}
</span> </span>
); );

View file

@ -244,6 +244,7 @@ const Header = (props: Props) => {
} }
className="header__navigation-item menu__title header__navigation-item--icon" className="header__navigation-item menu__title header__navigation-item--icon"
icon={ICONS.MENU} icon={ICONS.MENU}
aria-expanded={sidebarOpen}
onClick={() => setSidebarOpen(!sidebarOpen)} onClick={() => setSidebarOpen(!sidebarOpen)}
> >
{isAbsoluteSideNavHidden && isMobile && notificationsEnabled && <NotificationBubble />} {isAbsoluteSideNavHidden && isMobile && notificationsEnabled && <NotificationBubble />}