mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
accessibility
This commit is contained in:
parent
9f8e711373
commit
89460df9d4
2 changed files with 5 additions and 1 deletions
|
@ -27,8 +27,12 @@ function setupMobileNav() {
|
|||
navbarToggler.addEventListener("click", function(event) {
|
||||
toggleClass('navbarSupportedContent', 'show_menu');
|
||||
var isExpanded = navbarSupportedContent.classList.contains('show_menu');
|
||||
navbarToggler.setAttribute('aria-expanded', isExpanded ? 'true' : 'false');
|
||||
navbarSupportedContent.setAttribute('aria-expanded', isExpanded ? 'true' : 'false');
|
||||
});
|
||||
if(window.innerWidth < 992) {
|
||||
navbarToggler.setAttribute('aria-expanded', 'false');
|
||||
}
|
||||
}
|
||||
|
||||
function setupLightDark() {
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
|
||||
<button id="navbar-toggler" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<button id="navbar-toggler" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="true" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
|
|
Loading…
Reference in a new issue