Menu: Cleanup contextmenu demo and fix aria unit test to ignore empty

string values
This commit is contained in:
jzaefferer 2011-02-25 18:58:44 +01:00
parent 540b78d920
commit baf28d2c9d
2 changed files with 2 additions and 3 deletions

View File

@ -23,8 +23,7 @@
select: function(event, ui) {
$(this).hide();
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
},
input: $(this)
}
}).hide();
}).click(function(event) {
var menu = $(this).next();

View File

@ -14,7 +14,7 @@ test("accessibility", function () {
ok( ac.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all"), "menu class");
equals( ac.attr("role"), "listbox", "main role");
equals( ac.attr("aria-activedescendant"), undefined, "aria attribute not yet active");
ok( !ac.attr("aria-activedescendant"), "aria attribute not yet active");
var item = ac.find( "li:first" ).find( "a" ).attr( "id", "xid" ).end();
ac.menu( "focus", $.Event(), item );
equals( ac.attr("aria-activedescendant"), "xid", "aria attribute, id from dom");