From baf28d2c9d1ddc775b2eedaaf9b818935fbafe64 Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Fri, 25 Feb 2011 18:58:44 +0100 Subject: [PATCH] Menu: Cleanup contextmenu demo and fix aria unit test to ignore empty string values --- demos/menu/contextmenu.html | 3 +-- tests/unit/menu/menu_core.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/demos/menu/contextmenu.html b/demos/menu/contextmenu.html index 1fa4daaeb..7869d4364 100644 --- a/demos/menu/contextmenu.html +++ b/demos/menu/contextmenu.html @@ -23,8 +23,7 @@ select: function(event, ui) { $(this).hide(); $("#log").append("
Selected " + ui.item.text() + "
"); - }, - input: $(this) + } }).hide(); }).click(function(event) { var menu = $(this).next(); diff --git a/tests/unit/menu/menu_core.js b/tests/unit/menu/menu_core.js index b3d5c2b02..5b00e17e8 100644 --- a/tests/unit/menu/menu_core.js +++ b/tests/unit/menu/menu_core.js @@ -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"); -- 2.39.5