Skip to content

Commit

Permalink
fix(FileUploader): move role attribute to valid element
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Oct 7, 2019
1 parent dd2c135 commit 0350748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/react/src/components/FileUploader/FileUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,8 @@ export class FileUploaderButton extends Component {
}
}}
htmlFor={this.uid}
role={role}
{...other}>
{this.state.labelText}
<span role={role}>{this.state.labelText}</span>
</label>
<input
className={`${prefix}--visually-hidden`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ 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])) {
inputRef.current.click();
}
}}
{...other}>
<div className={dropareaClasses}>
<div className={dropareaClasses} role={role || 'button'}>
{labelText}
<input
type="file"
Expand Down

0 comments on commit 0350748

Please sign in to comment.