From 6e7e808d692423fe4faa0089a036e9a0c2c1800c Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 6 Dec 2008 14:58:52 +0000 Subject: Dialog: Fixed #3637: Added role of button to close link. --- tests/dialog.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/dialog.js') diff --git a/tests/dialog.js b/tests/dialog.js index c12266781..0c398105e 100644 --- a/tests/dialog.js +++ b/tests/dialog.js @@ -215,6 +215,24 @@ test("title id", function() { el.remove(); }); +test("ARIA", function() { + expect(4); + + el = $('
').dialog(); + + equals(dlg().attr('role'), 'dialog', 'dialog role'); + + var labelledBy = dlg().attr('aria-labelledby'); + ok(labelledBy.length > 0, 'has aria-labelledby attribute'); + equals(dlg().find('.ui-dialog-title').attr('id'), labelledBy, + 'proper aria-labelledby attribute'); + + equals(dlg().find('.ui-dialog-titlebar-close').attr('role'), 'button', + 'close link role'); + + el.remove(); +}); + module("dialog: Options"); test("autoOpen", function() { -- cgit v1.2.3