a11y: Improve icon button component regarding semantics and screen reader usage

이 커밋은 다음에 포함됨:
mhe
2016-11-02 20:18:39 +01:00
부모 77045d0886
커밋 87aabeb7af
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
+3 -3
파일 보기
@@ -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>
);
}