Skip to content

Commit

Permalink
Add aria-required
Browse files Browse the repository at this point in the history
  • Loading branch information
Rall3n committed May 19, 2022
1 parent 9e34c65 commit b2713b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-select/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ export default class Select<
tabIndex,
form,
menuIsOpen,
required
} = this.props;
const { Input } = this.getComponents();
const { inputIsHidden, ariaSelection } = this.state;
Expand All @@ -1578,6 +1579,7 @@ export default class Select<
'aria-invalid': this.props['aria-invalid'],
'aria-label': this.props['aria-label'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-required': required,
role: 'combobox',
...(menuIsOpen && {
'aria-controls': this.getElementId('listbox'),
Expand Down

0 comments on commit b2713b4

Please sign in to comment.