@@ -144,6 +144,19 @@ const MultiSelect = forwardRef<HTMLInputElement, MultiSelectProps>(
144144 return show ( ) ;
145145 } ) ;
146146
147+ const listboxId = props . id ? `${ props . id } -listbox` : undefined ;
148+
149+ const {
150+ id,
151+ name,
152+ 'aria-label' : ariaLabel ,
153+ 'aria-labelledby' : ariaLabelledBy ,
154+ 'aria-describedby' : ariaDescribedBy ,
155+ 'aria-invalid' : ariaInvalid ,
156+ 'aria-required' : ariaRequired ,
157+ ...containerProps
158+ } = props ;
159+
147160 return (
148161 < Box
149162 is = 'div'
@@ -152,7 +165,7 @@ const MultiSelect = forwardRef<HTMLInputElement, MultiSelectProps>(
152165 ref = { containerRef }
153166 onClick = { handleClick }
154167 disabled = { disabled }
155- { ...props }
168+ { ...containerProps }
156169 >
157170 < FlexItem grow = { 1 } >
158171 < Margins inline = 'x4' >
@@ -175,8 +188,17 @@ const MultiSelect = forwardRef<HTMLInputElement, MultiSelectProps>(
175188 'onBlur' : hide ,
176189 'onKeyDown' : handleKeyDown ,
177190 'onKeyUp' : handleKeyUp ,
191+ 'role' : 'combobox' ,
178192 'aria-expanded' : visible === AnimatedVisibility . VISIBLE ,
179- 'aria-labelledby' : props [ 'aria-labelledby' ] ,
193+ 'aria-haspopup' : 'listbox' ,
194+ 'aria-controls' : listboxId ,
195+ id,
196+ name,
197+ 'aria-label' : ariaLabel ,
198+ 'aria-labelledby' : ariaLabelledBy ,
199+ 'aria-describedby' : ariaDescribedBy ,
200+ 'aria-invalid' : ariaInvalid ,
201+ 'aria-required' : ariaRequired ,
180202 } ) }
181203 { internalValue . map ( ( value : SelectOption [ 0 ] ) => {
182204 const currentOption = options . find (
@@ -237,7 +259,7 @@ const MultiSelect = forwardRef<HTMLInputElement, MultiSelectProps>(
237259 multiple
238260 filter = { filter }
239261 renderItem = { renderItem || CheckOption }
240- role = 'listbox'
262+ id = { listboxId }
241263 options = { filteredOptions }
242264 onSelect = { internalChanged }
243265 cursor = { cursor }
0 commit comments