@@ -437,7 +437,7 @@ class Popover extends Component<PopoverProps, PopoverState> {
437437 let trigger = this . _renderTrigger
438438
439439 if ( trigger ) {
440- const { on, shouldContainFocus } = this . props
440+ const { on } = this . props
441441
442442 let onClick : React . MouseEventHandler | undefined = undefined
443443 let onFocus : React . FocusEventHandler | undefined = undefined
@@ -468,17 +468,13 @@ class Popover extends Component<PopoverProps, PopoverState> {
468468 }
469469 }
470470
471- if ( shouldContainFocus ) {
472- // only set aria-expanded if popover can contain focus
473- expanded = this . shown ? 'true' : 'false'
471+ // only set aria-expanded if popover can contain focus
472+ expanded = this . shown ? 'true' : 'false'
474473
475- if ( 'aria-expanded' in this . props ) {
476- // @ts -expect-error It is an escape hatch, in case someone
477- // wants to remove/override aria-expanded even when shouldContainFocus
478- expanded = this . props [ 'aria-expanded' ]
479- }
480- } else {
481- expanded = undefined
474+ if ( 'aria-expanded' in this . props ) {
475+ // @ts -expect-error It is an escape hatch, in case someone
476+ // wants to remove/override aria-expanded even when shouldContainFocus
477+ expanded = this . props [ 'aria-expanded' ]
482478 }
483479
484480 trigger = safeCloneElement ( trigger , {
0 commit comments