Skip to content

Commit aa08cd1

Browse files
committed
fix(react-aria-components): apply overlay id on Popover when no nested Dialog exists
1 parent 264b232 commit aa08cd1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/react-aria-components/src/Popover.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export interface PopoverRenderProps {
9494
}
9595

9696
interface PopoverContextValue extends PopoverProps {
97+
id?: string,
9798
/** Contexts to clear. */
9899
clearContexts?: Context<any>[]
99100
}
@@ -224,6 +225,7 @@ function PopoverInner({state, isExiting, UNSTABLE_portalContainer, clearContexts
224225
<dom.div
225226
{...mergeProps(filterDOMProps(props, {global: true}), popoverProps)}
226227
{...renderProps}
228+
id={isDialog ? props.id : undefined}
227229
role={isDialog ? 'dialog' : undefined}
228230
tabIndex={isDialog ? -1 : undefined}
229231
aria-label={props['aria-label']}

0 commit comments

Comments
 (0)