From e9289d16a3029fad3acfddb242a12344177f8b9f Mon Sep 17 00:00:00 2001 From: Tom Koscielniak Date: Wed, 13 May 2026 15:10:59 +0200 Subject: [PATCH] fix(Modal): exclude Poppers in aria-hidden change Popper based components like Select or Dropdown get mounted to the DOM on the same level as Modal. Modal then on update can set aria-hidden label to true via function toggleSiblingsFromScreenReaders, which adds the label to all the elements that are siblings of the Modal, including these components.This causes the opened Popper based component to become invisible for screen readers and/or Playwright. Fix this by excluding all the Popper components from this function's behaviour. --- packages/react-core/src/components/Modal/Modal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-core/src/components/Modal/Modal.tsx b/packages/react-core/src/components/Modal/Modal.tsx index 281c379eebc..dac6ebbd864 100644 --- a/packages/react-core/src/components/Modal/Modal.tsx +++ b/packages/react-core/src/components/Modal/Modal.tsx @@ -111,7 +111,8 @@ class Modal extends Component { const target: HTMLElement = this.getElement(appendTo); const bodyChildren = target.children; for (const child of Array.from(bodyChildren)) { - if (child.id !== this.backdropId) { + const isPopperElement = child.hasAttribute('data-popper-placement'); + if (child.id !== this.backdropId && !isPopperElement) { hide ? child.setAttribute('aria-hidden', '' + hide) : child.removeAttribute('aria-hidden'); } }