Skip to content

Commit

Permalink
fix(FileUploaderDropContainer): remove invalid role attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Oct 3, 2019
1 parent bb68241 commit 97e7d0f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const props = {
','
),
disabled: boolean('Disabled (disabled)', false),
role: text('ARIA role of the button (role)', ''),
tabIndex: number('Tab index (tabIndex)', 0),
onChange: action('onChange'),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ describe('FileUploaderButton', () => {
expect(wrapper.find('input').prop('disabled')).toEqual(true);
});

it('does have default role', () => {
expect(mountWrapper.props().role).toBeTruthy();
});

it('resets the input value onClick', () => {
const input = mountWrapper.find(`.${prefix}--visually-hidden`);
input.instance().value = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default function FileUploaderDropContainer(props) {
multiple,
name,
onAddFiles,
role,
tabIndex,
...other
} = props;
Expand Down Expand Up @@ -98,7 +97,6 @@ export default function FileUploaderDropContainer(props) {
<label
className={labelClasses}
htmlFor={id || uid.current}
role={role || 'button'}
tabIndex={tabIndex || 0}
onKeyDown={evt => {
if (matches(evt, [keys.Enter, keys.Space])) {
Expand Down Expand Up @@ -156,11 +154,6 @@ FileUploaderDropContainer.propTypes = {
*/
name: PropTypes.string,

/**
* Provide an accessibility role for the <FileUploaderButton>
*/
role: PropTypes.string,

/**
* Provide a custom tabIndex value for the <FileUploaderButton>
*/
Expand Down

0 comments on commit 97e7d0f

Please sign in to comment.