Skip to content

Commit

Permalink
feat(acessibility): added ARIA-label property
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocore committed Oct 9, 2023
1 parent 60f4cd1 commit 0afbbd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions react/components/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class Button extends Component {

return (
<Element
aria-label={this.props.ariaLabel}
id={this.props.id}
data-testid={this.props.testId}
autoFocus={iconOnly ? undefined : this.props.autoFocus}
Expand Down Expand Up @@ -284,6 +285,7 @@ Button.defaultProps = {
}

Button.propTypes = {
ariaLabel: PropTypes.string,
/** Button size */
size: PropTypes.oneOf(['small', 'regular', 'large']),
/** Button prominence variation */
Expand Down

0 comments on commit 0afbbd9

Please sign in to comment.