Permalink
Browse files

Selectmenu tests: add test for button aria-labelledby attribute

  • Loading branch information...
fnagel committed Oct 25, 2012
1 parent 86f4c2f commit e059376eaed05f55c7f5c35a03fab827b69c86e1
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/unit/selectmenu/selectmenu_core.js
@@ -12,13 +12,14 @@ test("accessibility", function () {
button.simulate( "focus" );
links = menu.find("li.ui-menu-item a");
- expect(12 + links.length * 2);
+ expect(13 + links.length * 2);
equal( button.attr("role"), "combobox", "button link role" );
equal( button.attr("aria-haspopup"), "true", "button link aria-haspopup" );
equal( button.attr("aria-expanded"), "false", "button link aria-expanded" );
equal( button.attr("aria-autocomplete"), "list", "button link aria-autocomplete" );
equal( button.attr("aria-owns"), menu.attr("id"), "button link aria-owns" );
+ equal( button.attr("aria-labelledby"), element.prev("label").attr("id"), "button link aria-labelledby" );
equal( button.attr("tabindex"), 0, "button link tabindex" );
equal( menu.attr("role"), "listbox", "menu role" );

0 comments on commit e059376

Please sign in to comment.