Skip to content

Commit f5bd24e

Browse files
committed
fix(overlays): do not hide root when toast appears
1 parent 47ba703 commit f5bd24e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/src/utils/overlays.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,17 @@ export const present = async <OverlayPresentOptions>(
510510
return;
511511
}
512512

513-
setRootAriaHidden(true);
513+
514+
/**
515+
* Due to accessibility guidelines, toasts do not have
516+
* focus traps.
517+
*
518+
* All other overlays should have focus traps to prevent
519+
* the keyboard focus from leaving the overlay.
520+
*/
521+
if (overlay.el.tagName !== 'ION-TOAST') {
522+
setRootAriaHidden(true);
523+
}
514524

515525
document.body.classList.add(BACKDROP_NO_SCROLL);
516526

0 commit comments

Comments
 (0)