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) {
548548
549549 // Set aria-expanded attribute
550550 ariaElms . forEach ( toggleElm => {
551+ const expanded = force ?? sidebarElm . classList . contains ( 'show' ) ;
552+ toggleElm . setAttribute ( 'aria-expanded' , expanded ) ;
551553 toggleElm . setAttribute (
552- 'aria-expanded ' ,
553- force ?? sidebarElm . classList . contains ( 'show' ) ,
554+ 'aria-label ' ,
555+ expanded ? 'Hide primary navigation' : 'Show primary navigation' ,
554556 ) ;
555557 } ) ;
556558
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function main(config) {
4343 ? ''
4444 : `
4545 <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 ">
4747 <span></span><span></span><span></span>
4848 </div>
4949 </button>
You can’t perform that action at this time.
0 commit comments