Merge pull request #132 from marcus-herrmann/master

a11y: Improve icon button component regarding semantics, screen reader usage
This commit is contained in:
Eugen
2016-11-02 21:53:05 +01:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@ -35,9 +35,9 @@ const IconButton = React.createClass({
};
return (
<a href='#' title={this.props.title} className={`icon-button ${this.props.active ? 'active' : ''}`} onClick={this.handleClick} style={style}>
<i className={`fa fa-fw fa-${this.props.icon}`}></i>
</a>
<button aria-label={this.props.title} title={this.props.title} className={`icon-button ${this.props.active ? 'active' : ''}`} onClick={this.handleClick} style={style}>
<i className={`fa fa-fw fa-${this.props.icon}`} aria-hidden='true'></i>
</button>
);
}