This repository was archived by the owner on Mar 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -374,8 +374,9 @@ export default class Dropdown extends AutoControlledComponent<
374
374
getInputProps : ( options ?: GetInputPropsOptions ) => any ,
375
375
) {
376
376
const accessibilityMenuProps = getMenuProps ( { refKey : 'innerRef' } , { suppressRefError : true } )
377
+ const { search } = this . props
377
378
// If it's just a selection, some attributes and listeners from Downshift input need to go on the menu list.
378
- if ( ! this . props . search ) {
379
+ if ( ! search ) {
379
380
const accessibilityInputProps = getInputProps ( )
380
381
accessibilityMenuProps [ 'aria-activedescendant' ] =
381
382
accessibilityInputProps [ 'aria-activedescendant' ]
@@ -400,7 +401,7 @@ export default class Dropdown extends AutoControlledComponent<
400
401
< List
401
402
{ ...accessibilityMenuPropsRest }
402
403
styles = { styles . list }
403
- tabIndex = { - 1 }
404
+ tabIndex = { search ? undefined : - 1 } // needs to be focused when trigger button is activated.
404
405
aria-hidden = { ! isOpen }
405
406
items = { isOpen ? this . renderItems ( styles , variables , getItemProps , highlightedIndex ) : [ ] }
406
407
/>
You can’t perform that action at this time.
0 commit comments