File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -548,9 +548,11 @@ export function Events(Base) {
548
548
549
549
// Set aria-expanded attribute
550
550
ariaElms . forEach ( toggleElm => {
551
+ const expanded = force ?? sidebarElm . classList . contains ( 'show' ) ;
552
+ toggleElm . setAttribute ( 'aria-expanded' , expanded ) ;
551
553
toggleElm . setAttribute (
552
- 'aria-expanded ' ,
553
- force ?? sidebarElm . classList . contains ( 'show' ) ,
554
+ 'aria-label ' ,
555
+ expanded ? 'Hide primary navigation' : 'Show primary navigation' ,
554
556
) ;
555
557
} ) ;
556
558
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function main(config) {
43
43
? ''
44
44
: `
45
45
<button class="sidebar-toggle" tabindex="-1" title="Press \\ to toggle">
46
- <div class="sidebar-toggle-button" tabindex="0" aria-label="Toggle primary navigation" aria-keyshortcuts="\\" aria-controls="__sidebar">
46
+ <div class="sidebar-toggle-button" tabindex="0" aria-label="Hide primary navigation" aria-keyshortcuts="Use shortcut key \\" aria-controls="__sidebar" role="button ">
47
47
<span></span><span></span><span></span>
48
48
</div>
49
49
</button>
You can’t perform that action at this time.
0 commit comments