File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 23
23
:style =" { width: widthInPx, '--top-offset': `${mobileTopOffset}px` }"
24
24
class =" aside"
25
25
ref =" aside"
26
+ :aria-hidden =" closedExternally ? 'true': null"
26
27
@transitionstart =" isTransitioning = true"
27
28
@transitionend =" isTransitioning = false"
28
29
>
@@ -345,11 +346,13 @@ export default {
345
346
346
347
@include breakpoints-from (large , nav ) {
347
348
& :not (.dragging ) {
348
- transition : width 0.15s ease-in ;
349
+ transition : width 0.15s ease-in , visibility 0 s linear 0 s ;
349
350
}
350
351
351
352
& .force-close {
352
353
width : 0 !important ;
354
+ visibility : hidden ;
355
+ transition : width 0.15s ease-in , visibility 0s linear 0.2s ;
353
356
}
354
357
}
355
358
Original file line number Diff line number Diff line change @@ -251,7 +251,11 @@ describe('AdjustableSidebarWidth', () => {
251
251
closedExternally : true ,
252
252
} ,
253
253
} ) ;
254
- expect ( wrapper . find ( { ref : 'aside' } ) . classes ( ) ) . toContain ( 'force-close' ) ;
254
+ const aside = wrapper . find ( { ref : 'aside' } ) ;
255
+ expect ( aside . classes ( ) ) . toContain ( 'force-close' ) ;
256
+ expect ( aside . attributes ( ) ) . toMatchObject ( {
257
+ 'aria-hidden' : 'true' ,
258
+ } ) ;
255
259
wrapper . setProps ( { closedExternally : false } ) ;
256
260
expect ( wrapper . find ( { ref : 'aside' } ) . classes ( ) ) . not . toContain ( 'force-close' ) ;
257
261
} ) ;
You can’t perform that action at this time.
0 commit comments