File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -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'
474-
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
471+ // only set aria-expanded if popover can contain focus
472+ expanded = this . shown ? 'true' : 'false'
473+
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 , {
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ class Tooltip extends Component<TooltipProps, TooltipState> {
177177 elementRef = { this . handleRef }
178178 shouldCloseOnDocumentClick = { false }
179179 shouldCloseOnEscape
180+ aria-expanded = { undefined }
180181 >
181182 { ! preventTooltip ? (
182183 < span id = { this . _id } css = { styles ?. tooltip } role = "tooltip" >
You can’t perform that action at this time.
0 commit comments