File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
docs/dokka-presets/scripts Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,10 @@ function ensureNavButtonInteractable() {
8383 // Make the navButton focusable, add accessibility information
8484 navButton . setAttribute ( 'tabindex' , '0' ) ;
8585 navButton . setAttribute ( 'role' , 'button' ) ;
86- navButton . setAttribute ( 'aria-expanded' , 'false' ) ;
86+
87+ const sideMenuPartParent = navButton . closest ( ".sideMenuPart" )
88+ const navButtonExpanded = sideMenuPartParent ? ( sideMenuPartParent . classList . contains ( 'hidden' ) ? 'false' : 'true' ) : 'false'
89+ navButton . setAttribute ( 'aria-expanded' , navButtonExpanded ) ;
8790
8891 // Grab the page ID, use it for aria-label and aria-controls
8992 const sectionName = navButton . parentElement . parentElement . getAttribute ( 'pageid' )
You can’t perform that action at this time.
0 commit comments