Makes dropdown clickable, and work with screen reader
I'm lightly peeved with bulma that it wasn't clear how to make hover menus accessible, but clickable menus are just fine with my anyway.
This commit is contained in:
parent
9b8e5a4139
commit
0a70d6e981
2 changed files with 14 additions and 11 deletions
|
@ -152,8 +152,11 @@ function handleTabChange(target, parentElement) {
|
|||
}
|
||||
|
||||
function toggleMenu(e) {
|
||||
var el = e.target.closest('.pulldown-menu');
|
||||
el.setAttribute('aria-expanded', el.getAttribute('aria-expanded') == 'false');
|
||||
var el = e.currentTarget;
|
||||
var expanded = el.getAttribute('aria-expanded') == 'false';
|
||||
el.setAttribute('aria-expanded', expanded);
|
||||
var target = document.getElementById(el.getAttribute('data-controls'));
|
||||
addRemoveClass(target, 'is-active', expanded);
|
||||
}
|
||||
|
||||
function ajaxPost(form) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue