Skip to content

Commit

Permalink
fix(Button): remove Button ariaLabel warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bfbiggs committed Jan 24, 2020
1 parent fe2577b commit 4e53873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ exports[`TopbarBrandComponent should create and match snapshot 1`] = `
>
<div
class="md-brand__logo"
ng-reflect-klass="md-brand__logo"
ng-reflect-ng-class=""
>
Expand Down
9 changes: 0 additions & 9 deletions react/src/lib/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ import SelectableContext, { makeKeyboardKey } from '../SelectableContext';
import mapContextToProps from '@restart/context/mapContextToProps';

class Button extends React.Component {
componentDidMount() {
/* eslint-disable no-console */
const { ariaLabel, ariaLabelledBy } = this.props;
(!ariaLabel && !ariaLabelledBy)
&&
console.warn('[@momentum-ui/react] Button: Accessibility could be improved with ariaLabel');
/* eslint-enable no-console */
}

handleKeyDown = (e, eventKey) => {
const { onClick, parentOnSelect, parentKeyDown } = this.props;
if (e.which === 32 || e.which === 13 ||
Expand Down

0 comments on commit 4e53873

Please sign in to comment.