mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
add search landmark and disclosure pattern to menu
This commit is contained in:
parent
f23e6a3352
commit
6a9a590c7f
22 changed files with 119 additions and 64 deletions
|
@ -28,17 +28,13 @@ function onAuxClick(selector, callback, noPreventDefault) {
|
|||
// Show and hide the main menu on mobile devices.
|
||||
function toggleMainMenu() {
|
||||
let menu = document.querySelector(".header nav ul");
|
||||
let menuToggleButton = document.querySelector(".header .logo a");
|
||||
if (DomHelper.isVisible(menu)) {
|
||||
menu.style.display = "none";
|
||||
menuToggleButton.setAttribute("aria-expanded", false)
|
||||
} else {
|
||||
menu.style.display = "block";
|
||||
}
|
||||
|
||||
let searchElement = document.querySelector(".header .search");
|
||||
if (DomHelper.isVisible(searchElement)) {
|
||||
searchElement.style.display = "none";
|
||||
} else {
|
||||
searchElement.style.display = "block";
|
||||
menuToggleButton.setAttribute("aria-expanded", true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue