mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
Menu: Cleanup contextmenu demo and fix aria unit test to ignore empty
string values
This commit is contained in:
parent
540b78d920
commit
baf28d2c9d
@ -23,8 +23,7 @@
|
|||||||
select: function(event, ui) {
|
select: function(event, ui) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
|
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
|
||||||
},
|
}
|
||||||
input: $(this)
|
|
||||||
}).hide();
|
}).hide();
|
||||||
}).click(function(event) {
|
}).click(function(event) {
|
||||||
var menu = $(this).next();
|
var menu = $(this).next();
|
||||||
|
@ -14,7 +14,7 @@ test("accessibility", function () {
|
|||||||
|
|
||||||
ok( ac.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all"), "menu class");
|
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("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();
|
var item = ac.find( "li:first" ).find( "a" ).attr( "id", "xid" ).end();
|
||||||
ac.menu( "focus", $.Event(), item );
|
ac.menu( "focus", $.Event(), item );
|
||||||
equals( ac.attr("aria-activedescendant"), "xid", "aria attribute, id from dom");
|
equals( ac.attr("aria-activedescendant"), "xid", "aria attribute, id from dom");
|
||||||
|
Loading…
Reference in New Issue
Block a user