Merge pull request #538 from paulkaplan/add-button-title

Use the tool description as the button title to improve accessibility.
This commit is contained in:
Paul Kaplan 2018-06-28 14:32:36 -04:00 committed by GitHub
commit d90d51954f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,14 +15,11 @@ const ToolSelectComponent = props => (
}) })
} }
disabled={props.disabled} disabled={props.disabled}
title={props.intl.formatMessage(props.imgDescriptor)}
onClick={props.onMouseDown} onClick={props.onMouseDown}
> >
<img <img
alt={props.intl.formatMessage({ alt={props.intl.formatMessage(props.imgDescriptor)}
defaultMessage: props.imgDescriptor.defaultMessage,
description: props.imgDescriptor.description,
id: props.imgDescriptor.id
})}
className={styles.toolSelectIcon} className={styles.toolSelectIcon}
draggable={false} draggable={false}
src={props.imgSrc} src={props.imgSrc}