From c09a295d659ac85caca8be6ed398a21f7c422f90 Mon Sep 17 00:00:00 2001 From: Tina Quach <quacht@mit.edu> Date: Thu, 9 Nov 2017 21:28:29 -0500 Subject: [PATCH] remove aria-hidden and add button aria role --- src/components/close-button/close-button.jsx | 3 ++- src/components/icon-button/icon-button.jsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/close-button/close-button.jsx b/src/components/close-button/close-button.jsx index 2bc75ed24..e90bd1d64 100644 --- a/src/components/close-button/close-button.jsx +++ b/src/components/close-button/close-button.jsx @@ -7,6 +7,7 @@ import closeIcon from './icon--close.svg'; const CloseButton = props => ( <div + aria-label="Close" className={classNames( styles.closeButton, props.className, @@ -15,10 +16,10 @@ const CloseButton = props => ( [styles.large]: props.size === CloseButton.SIZE_LARGE } )} + role="button" onClick={props.onClick} > <img - aria-hidden="true" className={styles.closeIcon} src={closeIcon} /> diff --git a/src/components/icon-button/icon-button.jsx b/src/components/icon-button/icon-button.jsx index 799ab991f..c6f9ae3d0 100644 --- a/src/components/icon-button/icon-button.jsx +++ b/src/components/icon-button/icon-button.jsx @@ -11,10 +11,10 @@ const IconButton = ({ }) => ( <div className={classNames(styles.container, className)} + role="button" onClick={onClick} > <img - aria-hidden="true" className={styles.icon} src={img} /> -- GitLab