From b2713b42276bc95d4ce26d7c957d938be632ac5e Mon Sep 17 00:00:00 2001 From: Rall3n Date: Thu, 19 May 2022 16:24:25 +0200 Subject: [PATCH] Add `aria-required` --- packages/react-select/src/Select.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-select/src/Select.tsx b/packages/react-select/src/Select.tsx index 47adb1f2e2..d37c626ce5 100644 --- a/packages/react-select/src/Select.tsx +++ b/packages/react-select/src/Select.tsx @@ -1562,6 +1562,7 @@ export default class Select< tabIndex, form, menuIsOpen, + required } = this.props; const { Input } = this.getComponents(); const { inputIsHidden, ariaSelection } = this.state; @@ -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'),