From 966810a80ec2de89b2494a3bfee992aa25ce20c9 Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Tue, 24 Sep 2024 11:23:38 +0530 Subject: [PATCH] Replace show variable with hide in modal manager --- packages/mui-material/src/Modal/ModalManager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mui-material/src/Modal/ModalManager.ts b/packages/mui-material/src/Modal/ModalManager.ts index 4fc0695d96d04c..b97298b8300dc1 100644 --- a/packages/mui-material/src/Modal/ModalManager.ts +++ b/packages/mui-material/src/Modal/ModalManager.ts @@ -19,8 +19,8 @@ function isOverflowing(container: Element): boolean { return container.scrollHeight > container.clientHeight; } -export function ariaHidden(element: Element, show: boolean): void { - if (show) { +export function ariaHidden(element: Element, hide: boolean): void { + if (hide) { element.setAttribute('aria-hidden', 'true'); } else { element.removeAttribute('aria-hidden'); @@ -61,7 +61,7 @@ function ariaHiddenSiblings( mountElement: Element, currentElement: Element, elementsToExclude: readonly Element[], - show: boolean, + hide: boolean, ): void { const blacklist = [mountElement, currentElement, ...elementsToExclude]; @@ -69,7 +69,7 @@ function ariaHiddenSiblings( const isNotExcludedElement = !blacklist.includes(element); const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element); if (isNotExcludedElement && isNotForbiddenElement) { - ariaHidden(element, show); + ariaHidden(element, hide); } }); }