diff --git a/plume-front/src/lib.rs b/plume-front/src/lib.rs index 74c3557d..191a3397 100755 --- a/plume-front/src/lib.rs +++ b/plume-front/src/lib.rs @@ -101,7 +101,11 @@ fn menu() { let show_menu = Closure::wrap(Box::new(|_: TouchEvent| { self::document() .get_element_by_id("menu") - .map(|menu| menu.class_list().add_1("show")) + .map(|menu| { + menu.set_attribute("aria-expanded", "true") + .map(|_| menu.class_list().add_1("show")) + }) + .unwrap() .unwrap() .unwrap(); }) as Box); @@ -113,7 +117,11 @@ fn menu() { let close_menu = Closure::wrap(Box::new(|_: TouchEvent| { self::document() .get_element_by_id("menu") - .map(|menu| menu.class_list().remove_1("show")) + .map(|menu| { + menu.set_attribute("aria-expanded", "false") + .map(|_| menu.class_list().remove_1("show")) + }) + .unwrap() .unwrap() .unwrap() }) as Box); diff --git a/templates/base.rs.html b/templates/base.rs.html index 801cd670..115ea4e7 100644 --- a/templates/base.rs.html +++ b/templates/base.rs.html @@ -21,9 +21,9 @@
-
+