Skip to content

Commit 5c61798

Browse files
committed
Add aria-required
1 parent 45b3c8d commit 5c61798

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-select/src/Select.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,6 +1571,7 @@ export default class Select<
15711571
tabIndex,
15721572
form,
15731573
menuIsOpen,
1574+
required
15741575
} = this.props;
15751576
const { Input } = this.getComponents();
15761577
const { inputIsHidden, ariaSelection } = this.state;
@@ -1587,6 +1588,7 @@ export default class Select<
15871588
'aria-invalid': this.props['aria-invalid'],
15881589
'aria-label': this.props['aria-label'],
15891590
'aria-labelledby': this.props['aria-labelledby'],
1591+
'aria-required': required,
15901592
role: 'combobox',
15911593
...(menuIsOpen && {
15921594
'aria-controls': this.getElementId('listbox'),

0 commit comments

Comments
 (0)