Skip to content

Commit b2713b4

Browse files
committed
Add aria-required
1 parent 9e34c65 commit b2713b4

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
@@ -1562,6 +1562,7 @@ export default class Select<
15621562
tabIndex,
15631563
form,
15641564
menuIsOpen,
1565+
required
15651566
} = this.props;
15661567
const { Input } = this.getComponents();
15671568
const { inputIsHidden, ariaSelection } = this.state;
@@ -1578,6 +1579,7 @@ export default class Select<
15781579
'aria-invalid': this.props['aria-invalid'],
15791580
'aria-label': this.props['aria-label'],
15801581
'aria-labelledby': this.props['aria-labelledby'],
1582+
'aria-required': required,
15811583
role: 'combobox',
15821584
...(menuIsOpen && {
15831585
'aria-controls': this.getElementId('listbox'),

0 commit comments

Comments
 (0)