File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -539,7 +539,6 @@ export const present = async <OverlayPresentOptions>(
539539
540540 const completed = await overlayAnimation ( overlay , animationBuilder , overlay . el , opts ) ;
541541 if ( completed ) {
542- overlay . el . removeAttribute ( 'aria-hidden' ) ;
543542 overlay . didPresent . emit ( ) ;
544543 overlay . didPresentShorthand ?. emit ( ) ;
545544 }
@@ -753,6 +752,8 @@ const overlayAnimation = async (
753752 animation . duration ( 0 ) ;
754753 }
755754
755+ aniRoot . setAttribute ( 'aria-hidden' , 'true' ) ;
756+
756757 if ( overlay . keyboardClose ) {
757758 animation . beforeAddWrite ( ( ) => {
758759 const activeElement = baseEl . ownerDocument ! . activeElement as HTMLElement ;
@@ -762,15 +763,15 @@ const overlayAnimation = async (
762763 } ) ;
763764 }
764765
766+ animation . afterAddWrite ( ( ) => {
767+ aniRoot . removeAttribute ( 'aria-hidden' ) ;
768+ } ) ;
769+
765770 const activeAni = activeAnimations . get ( overlay ) || [ ] ;
766771 activeAnimations . set ( overlay , [ ...activeAni , animation ] ) ;
767772
768- aniRoot . setAttribute ( 'aria-hidden' , 'true' ) ;
769-
770773 await animation . play ( ) ;
771774
772- aniRoot . removeAttribute ( 'aria-hidden' ) ;
773-
774775 return true ;
775776} ;
776777
You can’t perform that action at this time.
0 commit comments