diff --git a/src/core/event/index.js b/src/core/event/index.js index e14ecf365..12fa3c78c 100644 --- a/src/core/event/index.js +++ b/src/core/event/index.js @@ -548,9 +548,11 @@ export function Events(Base) { // Set aria-expanded attribute ariaElms.forEach(toggleElm => { + const expanded = force ?? sidebarElm.classList.contains('show'); + toggleElm.setAttribute('aria-expanded', expanded); toggleElm.setAttribute( - 'aria-expanded', - force ?? sidebarElm.classList.contains('show'), + 'aria-label', + expanded ? 'Hide primary navigation' : 'Show primary navigation', ); }); diff --git a/src/core/render/tpl.js b/src/core/render/tpl.js index eb208dde0..88b732a78 100644 --- a/src/core/render/tpl.js +++ b/src/core/render/tpl.js @@ -43,7 +43,7 @@ export function main(config) { ? '' : `