diff --git a/packages/mui-material/src/Modal/ModalManager.ts b/packages/mui-material/src/Modal/ModalManager.ts index 89a76e61cf9dac..93752acffc72bc 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); } }); }