File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 88 function toggleNavbarMenu ( e ) {
99 e . stopPropagation ( ) // trap event
1010 var html = document . documentElement
11- var menu = document . getElementById ( this . dataset . target )
11+ var menu = document . getElementById ( this . getAttribute ( 'aria-controls' ) || this . dataset . target )
1212 if ( ! menu . classList . contains ( 'is-active' ) && / m o b i / i. test ( window . navigator . userAgent ) ) {
1313 if ( Math . round ( parseFloat ( window . getComputedStyle ( html ) . minHeight ) ) !== window . innerHeight ) {
1414 html . style . setProperty ( '--vh' , window . innerHeight / 100 + 'px' )
1717 }
1818 }
1919 html . classList . toggle ( 'is-clipped--navbar' )
20- this . classList . toggle ( 'is-active' )
20+ navbarBurger . setAttribute ( 'aria-expanded' , this . classList . toggle ( 'is-active' ) )
2121 menu . classList . toggle ( 'is-active' )
2222 }
2323} ) ( )
Original file line number Diff line number Diff line change 33 <div class =" navbar-brand" >
44 <a class =" navbar-item logo" title =" Asciidoctor" href =" https://asciidoctor.org" ><img src =" {{{ uiRootPath }}} /img/asciidoctor-logo.svg" alt =" Asciidoctor" width =" 48" ></a >
55 <a class =" navbar-item title" href =" {{ #with (and site.url site.homeUrl )}} {{{ @root.site.url }}}{{{ this }}} {{ else }} {{{ siteRootPath }}} {{ /with }} " >{{ site.title }} </a >
6- <button class =" navbar-burger" data-target =" topbar-nav" >
6+ <button class =" navbar-burger" aria-controls =" topbar-nav" aria-expanded = " false " aria-label = " Toggle main menu " >
77 <span ></span >
88 <span ></span >
99 <span ></span >
You can’t perform that action at this time.
0 commit comments